Updated Hosted Sharepoing Provider (Foundation 2010):
A) Powershell support added within the provider B) Now returns the actual deployed language packs C) The PeoplePicker points to the organization OU and shows only the users from the tentant organization. A requirement when used with Exchange 2010 SP2 Addressbook Policies D) Shared SSL root added to use wild card certificates as part of hosting plan. When enabled the host name is generated. E) Search fix: Provisioning of localhost file where the server component is active. This system expected to be the search server. Within the local hostfile the sites are listed with their local ip address so the search server can resolve the site and crawl through their data. This component needs to be compiled with .NET 2.0 together with Provers.Base, OS.Windows2003, OS.Windows2008, Server.Utils, and Server components. Out standing is to update the build and deployment package for a dedicated deployment packaged so this component is using .NET 2.0, all other should be using .NET 4.0. This will eliminate the configuration circus that was required to get the .NET 4.0 version of this component working previously.
This commit is contained in:
parent
38592df9e6
commit
a0d9e59db2
25 changed files with 3174 additions and 2256 deletions
|
@ -49,7 +49,7 @@
|
|||
|
||||
<asp:Image ID="img1" runat="server" ImageUrl='<%# GetAccountImage() %>' ImageAlign="AbsMiddle" />
|
||||
<asp:LinkButton ID="cmdSelectAccount" CommandName="SelectAccount"
|
||||
CommandArgument='<%# Eval("AccountName").ToString() + "|" + Eval("DisplayName").ToString() + "|" + Eval("PrimaryEmailAddress")+ "|" + Eval("AccountId")%>'
|
||||
CommandArgument='<%# Eval("AccountName").ToString() + "|" + Eval("DisplayName").ToString() + "|" + Eval("PrimaryEmailAddress")+ "|" + Eval("AccountId")+ "|" + Eval("SamAccountName")%>'
|
||||
runat="server" Text='<%# Eval("DisplayName") %>'></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2012, Outercurve Foundation.
|
||||
// Copyright (c) 2010, SMB SAAS Systems Inc.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
|
@ -11,7 +11,7 @@
|
|||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// - Neither the name of the SMB SAAS Systems Inc. nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
|
@ -50,21 +50,82 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
ViewState["IncludeMailboxes"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public bool IncludeMailboxesOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
object ret = ViewState["IncludeMailboxesOnly"];
|
||||
return (ret != null) ? (bool)ret : false;
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["IncludeMailboxesOnly"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public bool ExcludeOCSUsers
|
||||
{
|
||||
get
|
||||
{
|
||||
object ret = ViewState["ExcludeOCSUsers"];
|
||||
return (ret != null) ? (bool)ret : false;
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ExcludeOCSUsers"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
public bool ExcludeLyncUsers
|
||||
{
|
||||
get
|
||||
{
|
||||
object ret = ViewState["ExcludeLyncUsers"];
|
||||
return (ret != null) ? (bool)ret : false;
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ExcludeLyncUsers"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public bool ExcludeBESUsers
|
||||
{
|
||||
get
|
||||
{
|
||||
object ret = ViewState["ExcludeBESUsers"];
|
||||
return (ret != null) ? (bool)ret : false;
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ExcludeBESUsers"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public int ExcludeAccountId
|
||||
{
|
||||
get { return PanelRequest.AccountID; }
|
||||
}
|
||||
{
|
||||
get { return PanelRequest.AccountID; }
|
||||
}
|
||||
|
||||
public void SetAccount(OrganizationUser account)
|
||||
{
|
||||
BindSelectedAccount(account);
|
||||
}
|
||||
public void SetAccount(OrganizationUser account)
|
||||
{
|
||||
BindSelectedAccount(account);
|
||||
}
|
||||
|
||||
public string GetAccount()
|
||||
{
|
||||
return (string)ViewState["AccountName"];
|
||||
}
|
||||
|
||||
public string GetSAMAccountName()
|
||||
{
|
||||
return (string)ViewState["SAMAccountName"];
|
||||
}
|
||||
|
||||
public string GetAccount()
|
||||
{
|
||||
return (string)ViewState["AccountName"];
|
||||
}
|
||||
|
||||
public string GetDisplayName()
|
||||
{
|
||||
|
@ -77,56 +138,93 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
}
|
||||
|
||||
public int GetAccountId()
|
||||
{
|
||||
return Utils.ParseInt(ViewState["AccountId"], 0);
|
||||
{
|
||||
return Utils.ParseInt(ViewState["AccountId"], 0);
|
||||
}
|
||||
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void BindSelectedAccount(OrganizationUser account)
|
||||
{
|
||||
if (account != null)
|
||||
{
|
||||
txtDisplayName.Text = account.DisplayName;
|
||||
private void BindSelectedAccount(OrganizationUser account)
|
||||
{
|
||||
if (account != null)
|
||||
{
|
||||
txtDisplayName.Text = account.DisplayName;
|
||||
ViewState["AccountName"] = account.AccountName;
|
||||
ViewState["DisplayName"] = account.DisplayName;
|
||||
ViewState["PrimaryEmailAddress"] = account.PrimaryEmailAddress;
|
||||
ViewState["AccountId"] = account.AccountId;
|
||||
}
|
||||
else
|
||||
{
|
||||
txtDisplayName.Text = "";
|
||||
ViewState["AccountName"] = null;
|
||||
ViewState["AccountId"] = account.AccountId;
|
||||
ViewState["SAMAccountName"] = account.SamAccountName;
|
||||
}
|
||||
else
|
||||
{
|
||||
txtDisplayName.Text = "";
|
||||
ViewState["AccountName"] = null;
|
||||
ViewState["DisplayName"] = null;
|
||||
ViewState["PrimaryEmailAddress"] = null;
|
||||
ViewState["AccountId"] = null;
|
||||
|
||||
ViewState["AccountId"] = null;
|
||||
ViewState["SAMAccountName"] = null;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string GetAccountImage()
|
||||
{
|
||||
public string GetAccountImage()
|
||||
{
|
||||
return GetThemedImage("Exchange/admin_16.png");
|
||||
}
|
||||
}
|
||||
|
||||
private void BindPopupAccounts()
|
||||
{
|
||||
OrganizationUser[] accounts = ES.Services.Organizations.SearchAccounts(PanelRequest.ItemID,
|
||||
ddlSearchColumn.SelectedValue, txtSearchValue.Text + "%", "", IncludeMailboxes);
|
||||
private void BindPopupAccounts()
|
||||
{
|
||||
OrganizationUser[] accounts = ES.Services.Organizations.SearchAccounts(PanelRequest.ItemID,
|
||||
ddlSearchColumn.SelectedValue, txtSearchValue.Text + "%", "", IncludeMailboxes);
|
||||
|
||||
if (ExcludeAccountId > 0)
|
||||
{
|
||||
List<OrganizationUser> updatedAccounts = new List<OrganizationUser>();
|
||||
foreach (OrganizationUser account in accounts)
|
||||
if (account.AccountId != ExcludeAccountId)
|
||||
updatedAccounts.Add(account);
|
||||
if (ExcludeAccountId > 0)
|
||||
{
|
||||
List<OrganizationUser> updatedAccounts = new List<OrganizationUser>();
|
||||
foreach (OrganizationUser account in accounts)
|
||||
if (account.AccountId != ExcludeAccountId)
|
||||
updatedAccounts.Add(account);
|
||||
|
||||
accounts = updatedAccounts.ToArray();
|
||||
}
|
||||
|
||||
if (IncludeMailboxesOnly)
|
||||
{
|
||||
|
||||
List<OrganizationUser> updatedAccounts = new List<OrganizationUser>();
|
||||
foreach (OrganizationUser account in accounts)
|
||||
{
|
||||
bool addUser = false;
|
||||
if (account.ExternalEmail != string.Empty) addUser = true;
|
||||
if ((account.IsBlackBerryUser) & (ExcludeBESUsers)) addUser = false;
|
||||
if ((account.IsLyncUser) & (ExcludeLyncUsers)) addUser = false;
|
||||
|
||||
if (addUser) updatedAccounts.Add(account);
|
||||
}
|
||||
|
||||
accounts = updatedAccounts.ToArray();
|
||||
}
|
||||
else
|
||||
if ((ExcludeOCSUsers) | (ExcludeBESUsers) | (ExcludeLyncUsers))
|
||||
{
|
||||
|
||||
List<OrganizationUser> updatedAccounts = new List<OrganizationUser>();
|
||||
foreach (OrganizationUser account in accounts)
|
||||
{
|
||||
bool addUser = true;
|
||||
if ((account.IsOCSUser) & (ExcludeOCSUsers)) addUser = false;
|
||||
if ((account.IsLyncUser) & (ExcludeLyncUsers)) addUser = false;
|
||||
if ((account.IsBlackBerryUser) & (ExcludeBESUsers)) addUser = false;
|
||||
|
||||
if (addUser) updatedAccounts.Add(account);
|
||||
}
|
||||
|
||||
accounts = updatedAccounts.ToArray();
|
||||
}
|
||||
|
||||
accounts = updatedAccounts.ToArray();
|
||||
}
|
||||
|
||||
Array.Sort(accounts, CompareAccount);
|
||||
if (Direction == SortDirection.Ascending)
|
||||
|
@ -136,15 +234,15 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
}
|
||||
else
|
||||
Direction = SortDirection.Ascending;
|
||||
|
||||
|
||||
gvPopupAccounts.DataSource = accounts;
|
||||
gvPopupAccounts.DataBind();
|
||||
}
|
||||
gvPopupAccounts.DataBind();
|
||||
}
|
||||
|
||||
private SortDirection Direction
|
||||
{
|
||||
get { return ViewState[DirectionString] == null ? SortDirection.Descending : (SortDirection)ViewState[DirectionString]; }
|
||||
set {ViewState[DirectionString] = value;}
|
||||
set { ViewState[DirectionString] = value; }
|
||||
}
|
||||
|
||||
private static int CompareAccount(OrganizationUser user1, OrganizationUser user2)
|
||||
|
@ -152,57 +250,58 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
return string.Compare(user1.DisplayName, user2.DisplayName);
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected void chkIncludeMailboxes_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
BindPopupAccounts();
|
||||
}
|
||||
|
||||
protected void cmdSearch_Click(object sender, ImageClickEventArgs e)
|
||||
{
|
||||
BindPopupAccounts();
|
||||
}
|
||||
protected void chkIncludeMailboxes_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
BindPopupAccounts();
|
||||
}
|
||||
|
||||
protected void cmdClear_Click(object sender, EventArgs e)
|
||||
{
|
||||
BindSelectedAccount(null);
|
||||
}
|
||||
protected void cmdSearch_Click(object sender, ImageClickEventArgs e)
|
||||
{
|
||||
BindPopupAccounts();
|
||||
}
|
||||
|
||||
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
|
||||
{
|
||||
// bind all accounts
|
||||
BindPopupAccounts();
|
||||
protected void cmdClear_Click(object sender, EventArgs e)
|
||||
{
|
||||
BindSelectedAccount(null);
|
||||
}
|
||||
|
||||
// show modal
|
||||
SelectAccountsModal.Show();
|
||||
}
|
||||
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
|
||||
{
|
||||
// bind all accounts
|
||||
BindPopupAccounts();
|
||||
|
||||
protected void gvPopupAccounts_RowCommand(object sender, GridViewCommandEventArgs e)
|
||||
{
|
||||
if (e.CommandName == "SelectAccount")
|
||||
{
|
||||
string[] parts = e.CommandArgument.ToString().Split('|');
|
||||
OrganizationUser account = new OrganizationUser();
|
||||
account.AccountName = parts[0];
|
||||
account.DisplayName = parts[1];
|
||||
account.PrimaryEmailAddress = parts[2];
|
||||
account.AccountId = Utils.ParseInt(parts[3]);
|
||||
// show modal
|
||||
SelectAccountsModal.Show();
|
||||
}
|
||||
|
||||
// set account
|
||||
BindSelectedAccount(account);
|
||||
protected void gvPopupAccounts_RowCommand(object sender, GridViewCommandEventArgs e)
|
||||
{
|
||||
if (e.CommandName == "SelectAccount")
|
||||
{
|
||||
string[] parts = e.CommandArgument.ToString().Split('|');
|
||||
OrganizationUser account = new OrganizationUser();
|
||||
account.AccountName = parts[0];
|
||||
account.DisplayName = parts[1];
|
||||
account.PrimaryEmailAddress = parts[2];
|
||||
account.AccountId = Utils.ParseInt(parts[3]);
|
||||
account.SamAccountName = parts[4];
|
||||
|
||||
// hide popup
|
||||
SelectAccountsModal.Hide();
|
||||
// set account
|
||||
BindSelectedAccount(account);
|
||||
|
||||
// update parent panel
|
||||
MainUpdatePanel.Update();
|
||||
}
|
||||
}
|
||||
// hide popup
|
||||
SelectAccountsModal.Hide();
|
||||
|
||||
// update parent panel
|
||||
MainUpdatePanel.Update();
|
||||
}
|
||||
}
|
||||
|
||||
protected void OnSorting(object sender, GridViewSortEventArgs e)
|
||||
{
|
||||
|
||||
|
||||
BindPopupAccounts();
|
||||
|
||||
}
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.4927
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue