Merge
This commit is contained in:
commit
7d592008fa
34 changed files with 1090 additions and 282 deletions
|
@ -127,9 +127,9 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution
|
|||
|
||||
private System.Threading.SendOrPostCallback GetOrganizationSecurityGroupsPagedOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback AddUserToSecurityGroupOperationCompleted;
|
||||
private System.Threading.SendOrPostCallback AddObjectToSecurityGroupOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback DeleteUserFromSecurityGroupOperationCompleted;
|
||||
private System.Threading.SendOrPostCallback DeleteObjectFromSecurityGroupOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback GetSecurityGroupsByMemberOperationCompleted;
|
||||
|
||||
|
@ -235,10 +235,10 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution
|
|||
public event GetOrganizationSecurityGroupsPagedCompletedEventHandler GetOrganizationSecurityGroupsPagedCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event AddUserToSecurityGroupCompletedEventHandler AddUserToSecurityGroupCompleted;
|
||||
public event AddObjectToSecurityGroupCompletedEventHandler AddObjectToSecurityGroupCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event DeleteUserFromSecurityGroupCompletedEventHandler DeleteUserFromSecurityGroupCompleted;
|
||||
public event DeleteObjectFromSecurityGroupCompletedEventHandler DeleteObjectFromSecurityGroupCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event GetSecurityGroupsByMemberCompletedEventHandler GetSecurityGroupsByMemberCompleted;
|
||||
|
@ -2166,112 +2166,112 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution
|
|||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/AddUserToSecurityGroup", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public int AddUserToSecurityGroup(int itemId, int userAccountId, string groupName)
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/AddObjectToSecurityGroup", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public int AddObjectToSecurityGroup(int itemId, int accountId, string groupName)
|
||||
{
|
||||
object[] results = this.Invoke("AddUserToSecurityGroup", new object[] {
|
||||
object[] results = this.Invoke("AddObjectToSecurityGroup", new object[] {
|
||||
itemId,
|
||||
userAccountId,
|
||||
accountId,
|
||||
groupName});
|
||||
return ((int)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginAddUserToSecurityGroup(int itemId, int userAccountId, string groupName, System.AsyncCallback callback, object asyncState)
|
||||
public System.IAsyncResult BeginAddObjectToSecurityGroup(int itemId, int accountId, string groupName, System.AsyncCallback callback, object asyncState)
|
||||
{
|
||||
return this.BeginInvoke("AddUserToSecurityGroup", new object[] {
|
||||
return this.BeginInvoke("AddObjectToSecurityGroup", new object[] {
|
||||
itemId,
|
||||
userAccountId,
|
||||
accountId,
|
||||
groupName}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public int EndAddUserToSecurityGroup(System.IAsyncResult asyncResult)
|
||||
public int EndAddObjectToSecurityGroup(System.IAsyncResult asyncResult)
|
||||
{
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((int)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void AddUserToSecurityGroupAsync(int itemId, int userAccountId, string groupName)
|
||||
public void AddObjectToSecurityGroupAsync(int itemId, int accountId, string groupName)
|
||||
{
|
||||
this.AddUserToSecurityGroupAsync(itemId, userAccountId, groupName, null);
|
||||
this.AddObjectToSecurityGroupAsync(itemId, accountId, groupName, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void AddUserToSecurityGroupAsync(int itemId, int userAccountId, string groupName, object userState)
|
||||
public void AddObjectToSecurityGroupAsync(int itemId, int accountId, string groupName, object userState)
|
||||
{
|
||||
if ((this.AddUserToSecurityGroupOperationCompleted == null))
|
||||
if ((this.AddObjectToSecurityGroupOperationCompleted == null))
|
||||
{
|
||||
this.AddUserToSecurityGroupOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddUserToSecurityGroupOperationCompleted);
|
||||
this.AddObjectToSecurityGroupOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddObjectToSecurityGroupOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("AddUserToSecurityGroup", new object[] {
|
||||
this.InvokeAsync("AddObjectToSecurityGroup", new object[] {
|
||||
itemId,
|
||||
userAccountId,
|
||||
groupName}, this.AddUserToSecurityGroupOperationCompleted, userState);
|
||||
accountId,
|
||||
groupName}, this.AddObjectToSecurityGroupOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnAddUserToSecurityGroupOperationCompleted(object arg)
|
||||
private void OnAddObjectToSecurityGroupOperationCompleted(object arg)
|
||||
{
|
||||
if ((this.AddUserToSecurityGroupCompleted != null))
|
||||
if ((this.AddObjectToSecurityGroupCompleted != null))
|
||||
{
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.AddUserToSecurityGroupCompleted(this, new AddUserToSecurityGroupCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
this.AddObjectToSecurityGroupCompleted(this, new AddObjectToSecurityGroupCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteUserFromSecurityGroup", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public int DeleteUserFromSecurityGroup(int itemId, int userAccountId, string groupName)
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteObjectFromSecurityGroup", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public int DeleteObjectFromSecurityGroup(int itemId, int accountId, string groupName)
|
||||
{
|
||||
object[] results = this.Invoke("DeleteUserFromSecurityGroup", new object[] {
|
||||
object[] results = this.Invoke("DeleteObjectFromSecurityGroup", new object[] {
|
||||
itemId,
|
||||
userAccountId,
|
||||
accountId,
|
||||
groupName});
|
||||
return ((int)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginDeleteUserFromSecurityGroup(int itemId, int userAccountId, string groupName, System.AsyncCallback callback, object asyncState)
|
||||
public System.IAsyncResult BeginDeleteObjectFromSecurityGroup(int itemId, int accountId, string groupName, System.AsyncCallback callback, object asyncState)
|
||||
{
|
||||
return this.BeginInvoke("DeleteUserFromSecurityGroup", new object[] {
|
||||
return this.BeginInvoke("DeleteObjectFromSecurityGroup", new object[] {
|
||||
itemId,
|
||||
userAccountId,
|
||||
accountId,
|
||||
groupName}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public int EndDeleteUserFromSecurityGroup(System.IAsyncResult asyncResult)
|
||||
public int EndDeleteObjectFromSecurityGroup(System.IAsyncResult asyncResult)
|
||||
{
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((int)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void DeleteUserFromSecurityGroupAsync(int itemId, int userAccountId, string groupName)
|
||||
public void DeleteObjectFromSecurityGroupAsync(int itemId, int accountId, string groupName)
|
||||
{
|
||||
this.DeleteUserFromSecurityGroupAsync(itemId, userAccountId, groupName, null);
|
||||
this.DeleteObjectFromSecurityGroupAsync(itemId, accountId, groupName, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void DeleteUserFromSecurityGroupAsync(int itemId, int userAccountId, string groupName, object userState)
|
||||
public void DeleteObjectFromSecurityGroupAsync(int itemId, int accountId, string groupName, object userState)
|
||||
{
|
||||
if ((this.DeleteUserFromSecurityGroupOperationCompleted == null))
|
||||
if ((this.DeleteObjectFromSecurityGroupOperationCompleted == null))
|
||||
{
|
||||
this.DeleteUserFromSecurityGroupOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteUserFromSecurityGroupOperationCompleted);
|
||||
this.DeleteObjectFromSecurityGroupOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteObjectFromSecurityGroupOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("DeleteUserFromSecurityGroup", new object[] {
|
||||
this.InvokeAsync("DeleteObjectFromSecurityGroup", new object[] {
|
||||
itemId,
|
||||
userAccountId,
|
||||
groupName}, this.DeleteUserFromSecurityGroupOperationCompleted, userState);
|
||||
accountId,
|
||||
groupName}, this.DeleteObjectFromSecurityGroupOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnDeleteUserFromSecurityGroupOperationCompleted(object arg)
|
||||
private void OnDeleteObjectFromSecurityGroupOperationCompleted(object arg)
|
||||
{
|
||||
if ((this.DeleteUserFromSecurityGroupCompleted != null))
|
||||
if ((this.DeleteObjectFromSecurityGroupCompleted != null))
|
||||
{
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.DeleteUserFromSecurityGroupCompleted(this, new DeleteUserFromSecurityGroupCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
this.DeleteObjectFromSecurityGroupCompleted(this, new DeleteObjectFromSecurityGroupCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3327,18 +3327,18 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution
|
|||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
public delegate void AddUserToSecurityGroupCompletedEventHandler(object sender, AddUserToSecurityGroupCompletedEventArgs e);
|
||||
public delegate void AddObjectToSecurityGroupCompletedEventHandler(object sender, AddObjectToSecurityGroupCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class AddUserToSecurityGroupCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
|
||||
public partial class AddObjectToSecurityGroupCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
|
||||
{
|
||||
|
||||
private object[] results;
|
||||
|
||||
internal AddUserToSecurityGroupCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||
internal AddObjectToSecurityGroupCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||
base(exception, cancelled, userState)
|
||||
{
|
||||
this.results = results;
|
||||
|
@ -3357,18 +3357,18 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution
|
|||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
public delegate void DeleteUserFromSecurityGroupCompletedEventHandler(object sender, DeleteUserFromSecurityGroupCompletedEventArgs e);
|
||||
public delegate void DeleteObjectFromSecurityGroupCompletedEventHandler(object sender, DeleteObjectFromSecurityGroupCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class DeleteUserFromSecurityGroupCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
|
||||
public partial class DeleteObjectFromSecurityGroupCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
|
||||
{
|
||||
|
||||
private object[] results;
|
||||
|
||||
internal DeleteUserFromSecurityGroupCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||
internal DeleteObjectFromSecurityGroupCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||
base(exception, cancelled, userState)
|
||||
{
|
||||
this.results = results;
|
||||
|
|
|
@ -3407,7 +3407,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
ExchangeDistributionList dl = exchange.GetDistributionListGeneralSettings(accountName);
|
||||
|
||||
// add meta-item
|
||||
int accountId = AddAccount(itemId, ExchangeAccountType.DistributionList, email,
|
||||
int accountId = AddAccount(itemId, ExchangeAccountType.DistributionList, accountName,
|
||||
displayName, email, false,
|
||||
0, dl.SAMAccountName, null, 0, null);
|
||||
|
||||
|
@ -3993,7 +3993,8 @@ namespace WebsitePanel.EnterpriseServer
|
|||
List<ExchangeAccount> DistributionLists = GetAccounts(itemId, ExchangeAccountType.DistributionList);
|
||||
foreach (ExchangeAccount DistributionAccount in DistributionLists)
|
||||
{
|
||||
ExchangeDistributionList DistributionList = exchange.GetDistributionListGeneralSettings(DistributionAccount.AccountName);
|
||||
//ExchangeDistributionList DistributionList = exchange.GetDistributionListGeneralSettings(DistributionAccount.AccountName);
|
||||
OrganizationSecurityGroup DistributionList = OrganizationController.GetSecurityGroupGeneralSettings(itemId, DistributionAccount.AccountId);
|
||||
|
||||
foreach (ExchangeAccount member in DistributionList.MembersAccounts)
|
||||
{
|
||||
|
|
|
@ -2514,7 +2514,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return result;
|
||||
}
|
||||
|
||||
public static int AddUserToSecurityGroup(int itemId, int userAccountId, string groupName)
|
||||
public static int AddObjectToSecurityGroup(int itemId, int accountId, string groupName)
|
||||
{
|
||||
// check account
|
||||
int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive);
|
||||
|
@ -2531,11 +2531,11 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return -1;
|
||||
|
||||
// load user account
|
||||
OrganizationUser userAccount = GetAccount(itemId, userAccountId);
|
||||
ExchangeAccount account = ExchangeServerController.GetAccount(itemId, accountId);
|
||||
|
||||
Organizations orgProxy = GetOrganizationProxy(org.ServiceId);
|
||||
|
||||
orgProxy.AddUserToSecurityGroup(org.OrganizationId, userAccount.AccountName, groupName);
|
||||
orgProxy.AddObjectToSecurityGroup(org.OrganizationId, account.AccountName, groupName);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -2549,7 +2549,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
}
|
||||
}
|
||||
|
||||
public static int DeleteUserFromSecurityGroup(int itemId, int userAccountId, string groupName)
|
||||
public static int DeleteObjectFromSecurityGroup(int itemId, int accountId, string groupName)
|
||||
{
|
||||
// check account
|
||||
int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive);
|
||||
|
@ -2566,11 +2566,11 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return -1;
|
||||
|
||||
// load user account
|
||||
OrganizationUser userAccount = GetAccount(itemId, userAccountId);
|
||||
ExchangeAccount account = ExchangeServerController.GetAccount(itemId, accountId);
|
||||
|
||||
Organizations orgProxy = GetOrganizationProxy(org.ServiceId);
|
||||
|
||||
orgProxy.DeleteUserFromSecurityGroup(org.OrganizationId, userAccount.AccountName, groupName);
|
||||
orgProxy.DeleteObjectFromSecurityGroup(org.OrganizationId, account.AccountName, groupName);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -2699,8 +2699,8 @@ namespace WebsitePanel.EnterpriseServer
|
|||
|
||||
if (!includeOnlySecurityGroups)
|
||||
{
|
||||
accountTypes = string.Format("{0}, {1}, {2}, {3}, {4}", accountTypes, ((int)ExchangeAccountType.User), ((int)ExchangeAccountType.Mailbox),
|
||||
((int)ExchangeAccountType.Room), ((int)ExchangeAccountType.Equipment));
|
||||
accountTypes = string.Format("{0}, {1}, {2}, {3}, {4}, {5}", accountTypes, ((int)ExchangeAccountType.User), ((int)ExchangeAccountType.Mailbox),
|
||||
((int)ExchangeAccountType.Room), ((int)ExchangeAccountType.Equipment), ((int)ExchangeAccountType.DistributionList));
|
||||
}
|
||||
|
||||
List<ExchangeAccount> tmpAccounts = ObjectUtils.CreateListFromDataReader<ExchangeAccount>(
|
||||
|
@ -2711,9 +2711,22 @@ namespace WebsitePanel.EnterpriseServer
|
|||
|
||||
foreach (ExchangeAccount tmpAccount in tmpAccounts.ToArray())
|
||||
{
|
||||
if (tmpAccount.AccountType == ExchangeAccountType.SecurityGroup
|
||||
? GetSecurityGroupGeneralSettings(itemId, tmpAccount.AccountId) != null
|
||||
: GetUserGeneralSettings(itemId, tmpAccount.AccountId) != null)
|
||||
bool bSuccess = false;
|
||||
|
||||
switch (tmpAccount.AccountType)
|
||||
{
|
||||
case ExchangeAccountType.SecurityGroup:
|
||||
bSuccess = GetSecurityGroupGeneralSettings(itemId, tmpAccount.AccountId) != null;
|
||||
break;
|
||||
case ExchangeAccountType.DistributionList:
|
||||
bSuccess = ExchangeServerController.GetDistributionListGeneralSettings(itemId, tmpAccount.AccountId) != null;
|
||||
break;
|
||||
default:
|
||||
bSuccess = GetUserGeneralSettings(itemId, tmpAccount.AccountId) != null;
|
||||
break;
|
||||
}
|
||||
|
||||
if (bSuccess)
|
||||
{
|
||||
accounts.Add(tmpAccount);
|
||||
}
|
||||
|
|
|
@ -276,15 +276,15 @@ namespace WebsitePanel.EnterpriseServer
|
|||
}
|
||||
|
||||
[WebMethod]
|
||||
public int AddUserToSecurityGroup(int itemId, int userAccountId, string groupName)
|
||||
public int AddObjectToSecurityGroup(int itemId, int accountId, string groupName)
|
||||
{
|
||||
return OrganizationController.AddUserToSecurityGroup(itemId, userAccountId, groupName);
|
||||
return OrganizationController.AddObjectToSecurityGroup(itemId, accountId, groupName);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public int DeleteUserFromSecurityGroup(int itemId, int userAccountId, string groupName)
|
||||
public int DeleteObjectFromSecurityGroup(int itemId, int accountId, string groupName)
|
||||
{
|
||||
return OrganizationController.DeleteUserFromSecurityGroup(itemId, userAccountId, groupName);
|
||||
return OrganizationController.DeleteObjectFromSecurityGroup(itemId, accountId, groupName);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
|
|
|
@ -50,9 +50,9 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
|
||||
void SetSecurityGroupGeneralSettings(string organizationId, string groupName, string[] memberAccounts, string notes);
|
||||
|
||||
void AddUserToSecurityGroup(string organizationId, string loginName, string groupName);
|
||||
void AddObjectToSecurityGroup(string organizationId, string accountName, string groupName);
|
||||
|
||||
void DeleteUserFromSecurityGroup(string organizationId, string loginName, string groupName);
|
||||
void DeleteObjectFromSecurityGroup(string organizationId, string accountName, string groupName);
|
||||
|
||||
void SetUserGeneralSettings(string organizationId, string accountName, string displayName, string password,
|
||||
bool hideFromAddressBook, bool disabled, bool locked, string firstName, string initials,
|
||||
|
|
|
@ -5656,7 +5656,7 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
|
||||
internal Collection<PSObject> ExecuteShellCommand(Runspace runSpace, Command cmd)
|
||||
{
|
||||
return ExecuteShellCommand(runSpace, cmd, true);
|
||||
return ExecuteShellCommand(runSpace, cmd, false);
|
||||
}
|
||||
|
||||
internal Collection<PSObject> ExecuteShellCommand(Runspace runSpace, Command cmd, bool useDomainController)
|
||||
|
|
|
@ -1027,60 +1027,60 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
entry.CommitChanges();
|
||||
}
|
||||
|
||||
public void AddUserToSecurityGroup(string organizationId, string loginName, string groupName)
|
||||
public void AddObjectToSecurityGroup(string organizationId, string accountName, string groupName)
|
||||
{
|
||||
AddUserToSecurityGroupInternal(organizationId, loginName, groupName);
|
||||
AddObjectToSecurityGroupInternal(organizationId, accountName, groupName);
|
||||
}
|
||||
|
||||
internal void AddUserToSecurityGroupInternal(string organizationId, string loginName, string groupName)
|
||||
internal void AddObjectToSecurityGroupInternal(string organizationId, string accountName, string groupName)
|
||||
{
|
||||
HostedSolutionLog.LogStart("AddUserToSecurityGroupInternal");
|
||||
HostedSolutionLog.DebugInfo("organizationId : {0}", organizationId);
|
||||
HostedSolutionLog.DebugInfo("loginName : {0}", loginName);
|
||||
HostedSolutionLog.DebugInfo("accountName : {0}", accountName);
|
||||
HostedSolutionLog.DebugInfo("groupName : {0}", groupName);
|
||||
|
||||
if (string.IsNullOrEmpty(organizationId))
|
||||
throw new ArgumentNullException("organizationId");
|
||||
|
||||
if (string.IsNullOrEmpty(loginName))
|
||||
if (string.IsNullOrEmpty(accountName))
|
||||
throw new ArgumentNullException("loginName");
|
||||
|
||||
if (string.IsNullOrEmpty(groupName))
|
||||
throw new ArgumentNullException("groupName");
|
||||
|
||||
string userPath = GetUserPath(organizationId, loginName);
|
||||
string objectPath = GetObjectPath(organizationId, accountName);
|
||||
|
||||
string groupPath = GetGroupPath(organizationId, groupName);
|
||||
|
||||
ActiveDirectoryUtils.AddObjectToGroup(userPath, groupPath);
|
||||
ActiveDirectoryUtils.AddObjectToGroup(objectPath, groupPath);
|
||||
}
|
||||
|
||||
public void DeleteUserFromSecurityGroup(string organizationId, string loginName, string groupName)
|
||||
public void DeleteObjectFromSecurityGroup(string organizationId, string accountName, string groupName)
|
||||
{
|
||||
DeleteUserFromSecurityGroupInternal(organizationId, loginName, groupName);
|
||||
DeleteObjectFromSecurityGroupInternal(organizationId, accountName, groupName);
|
||||
}
|
||||
|
||||
internal void DeleteUserFromSecurityGroupInternal(string organizationId, string loginName, string groupName)
|
||||
internal void DeleteObjectFromSecurityGroupInternal(string organizationId, string accountName, string groupName)
|
||||
{
|
||||
HostedSolutionLog.LogStart("AddUserToSecurityGroupInternal");
|
||||
HostedSolutionLog.DebugInfo("organizationId : {0}", organizationId);
|
||||
HostedSolutionLog.DebugInfo("loginName : {0}", loginName);
|
||||
HostedSolutionLog.DebugInfo("accountName : {0}", accountName);
|
||||
HostedSolutionLog.DebugInfo("groupName : {0}", groupName);
|
||||
|
||||
if (string.IsNullOrEmpty(organizationId))
|
||||
throw new ArgumentNullException("organizationId");
|
||||
|
||||
if (string.IsNullOrEmpty(loginName))
|
||||
if (string.IsNullOrEmpty(accountName))
|
||||
throw new ArgumentNullException("loginName");
|
||||
|
||||
if (string.IsNullOrEmpty(groupName))
|
||||
throw new ArgumentNullException("groupName");
|
||||
|
||||
string userPath = GetUserPath(organizationId, loginName);
|
||||
string objectPath = GetObjectPath(organizationId, accountName);
|
||||
|
||||
string groupPath = GetGroupPath(organizationId, groupName);
|
||||
|
||||
ActiveDirectoryUtils.RemoveObjectFromGroup(userPath, groupPath);
|
||||
ActiveDirectoryUtils.RemoveObjectFromGroup(objectPath, groupPath);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -1089,7 +1089,5 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
{
|
||||
return Environment.UserDomainName != Environment.MachineName;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -85,9 +85,9 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
|
||||
private System.Threading.SendOrPostCallback SetSecurityGroupGeneralSettingsOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback AddUserToSecurityGroupOperationCompleted;
|
||||
private System.Threading.SendOrPostCallback AddObjectToSecurityGroupOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback DeleteUserFromSecurityGroupOperationCompleted;
|
||||
private System.Threading.SendOrPostCallback DeleteObjectFromSecurityGroupOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback SetUserGeneralSettingsOperationCompleted;
|
||||
|
||||
|
@ -142,10 +142,10 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
public event SetSecurityGroupGeneralSettingsCompletedEventHandler SetSecurityGroupGeneralSettingsCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event AddUserToSecurityGroupCompletedEventHandler AddUserToSecurityGroupCompleted;
|
||||
public event AddObjectToSecurityGroupCompletedEventHandler AddObjectToSecurityGroupCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event DeleteUserFromSecurityGroupCompletedEventHandler DeleteUserFromSecurityGroupCompleted;
|
||||
public event DeleteObjectFromSecurityGroupCompletedEventHandler DeleteObjectFromSecurityGroupCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event SetUserGeneralSettingsCompletedEventHandler SetUserGeneralSettingsCompleted;
|
||||
|
@ -704,109 +704,109 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/AddUserToSecurityGroup", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public void AddUserToSecurityGroup(string organizationId, string loginName, string groupName)
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/AddObjectToSecurityGroup", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public void AddObjectToSecurityGroup(string organizationId, string accountName, string groupName)
|
||||
{
|
||||
this.Invoke("AddUserToSecurityGroup", new object[] {
|
||||
this.Invoke("AddObjectToSecurityGroup", new object[] {
|
||||
organizationId,
|
||||
loginName,
|
||||
accountName,
|
||||
groupName});
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginAddUserToSecurityGroup(string organizationId, string loginName, string groupName, System.AsyncCallback callback, object asyncState)
|
||||
public System.IAsyncResult BeginAddObjectToSecurityGroup(string organizationId, string accountName, string groupName, System.AsyncCallback callback, object asyncState)
|
||||
{
|
||||
return this.BeginInvoke("AddUserToSecurityGroup", new object[] {
|
||||
return this.BeginInvoke("AddObjectToSecurityGroup", new object[] {
|
||||
organizationId,
|
||||
loginName,
|
||||
accountName,
|
||||
groupName}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void EndAddUserToSecurityGroup(System.IAsyncResult asyncResult)
|
||||
public void EndAddObjectToSecurityGroup(System.IAsyncResult asyncResult)
|
||||
{
|
||||
this.EndInvoke(asyncResult);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void AddUserToSecurityGroupAsync(string organizationId, string loginName, string groupName)
|
||||
public void AddObjectToSecurityGroupAsync(string organizationId, string accountName, string groupName)
|
||||
{
|
||||
this.AddUserToSecurityGroupAsync(organizationId, loginName, groupName, null);
|
||||
this.AddObjectToSecurityGroupAsync(organizationId, accountName, groupName, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void AddUserToSecurityGroupAsync(string organizationId, string loginName, string groupName, object userState)
|
||||
public void AddObjectToSecurityGroupAsync(string organizationId, string accountName, string groupName, object userState)
|
||||
{
|
||||
if ((this.AddUserToSecurityGroupOperationCompleted == null))
|
||||
if ((this.AddObjectToSecurityGroupOperationCompleted == null))
|
||||
{
|
||||
this.AddUserToSecurityGroupOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddUserToSecurityGroupOperationCompleted);
|
||||
this.AddObjectToSecurityGroupOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddObjectToSecurityGroupOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("AddUserToSecurityGroup", new object[] {
|
||||
this.InvokeAsync("AddObjectToSecurityGroup", new object[] {
|
||||
organizationId,
|
||||
loginName,
|
||||
groupName}, this.AddUserToSecurityGroupOperationCompleted, userState);
|
||||
accountName,
|
||||
groupName}, this.AddObjectToSecurityGroupOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnAddUserToSecurityGroupOperationCompleted(object arg)
|
||||
private void OnAddObjectToSecurityGroupOperationCompleted(object arg)
|
||||
{
|
||||
if ((this.AddUserToSecurityGroupCompleted != null))
|
||||
if ((this.AddObjectToSecurityGroupCompleted != null))
|
||||
{
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.AddUserToSecurityGroupCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
this.AddObjectToSecurityGroupCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteUserFromSecurityGroup", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public void DeleteUserFromSecurityGroup(string organizationId, string loginName, string groupName)
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteObjectFromSecurityGroup", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public void DeleteObjectFromSecurityGroup(string organizationId, string accountName, string groupName)
|
||||
{
|
||||
this.Invoke("DeleteUserFromSecurityGroup", new object[] {
|
||||
this.Invoke("DeleteObjectFromSecurityGroup", new object[] {
|
||||
organizationId,
|
||||
loginName,
|
||||
accountName,
|
||||
groupName});
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginDeleteUserFromSecurityGroup(string organizationId, string loginName, string groupName, System.AsyncCallback callback, object asyncState)
|
||||
public System.IAsyncResult BeginDeleteObjectFromSecurityGroup(string organizationId, string accountName, string groupName, System.AsyncCallback callback, object asyncState)
|
||||
{
|
||||
return this.BeginInvoke("DeleteUserFromSecurityGroup", new object[] {
|
||||
return this.BeginInvoke("DeleteObjectFromSecurityGroup", new object[] {
|
||||
organizationId,
|
||||
loginName,
|
||||
accountName,
|
||||
groupName}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void EndDeleteUserFromSecurityGroup(System.IAsyncResult asyncResult)
|
||||
public void EndDeleteObjectFromSecurityGroup(System.IAsyncResult asyncResult)
|
||||
{
|
||||
this.EndInvoke(asyncResult);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void DeleteUserFromSecurityGroupAsync(string organizationId, string loginName, string groupName)
|
||||
public void DeleteObjectFromSecurityGroupAsync(string organizationId, string accountName, string groupName)
|
||||
{
|
||||
this.DeleteUserFromSecurityGroupAsync(organizationId, loginName, groupName, null);
|
||||
this.DeleteObjectFromSecurityGroupAsync(organizationId, accountName, groupName, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void DeleteUserFromSecurityGroupAsync(string organizationId, string loginName, string groupName, object userState)
|
||||
public void DeleteObjectFromSecurityGroupAsync(string organizationId, string accountName, string groupName, object userState)
|
||||
{
|
||||
if ((this.DeleteUserFromSecurityGroupOperationCompleted == null))
|
||||
if ((this.DeleteObjectFromSecurityGroupOperationCompleted == null))
|
||||
{
|
||||
this.DeleteUserFromSecurityGroupOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteUserFromSecurityGroupOperationCompleted);
|
||||
this.DeleteObjectFromSecurityGroupOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteObjectFromSecurityGroupOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("DeleteUserFromSecurityGroup", new object[] {
|
||||
this.InvokeAsync("DeleteObjectFromSecurityGroup", new object[] {
|
||||
organizationId,
|
||||
loginName,
|
||||
groupName}, this.DeleteUserFromSecurityGroupOperationCompleted, userState);
|
||||
accountName,
|
||||
groupName}, this.DeleteObjectFromSecurityGroupOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnDeleteUserFromSecurityGroupOperationCompleted(object arg)
|
||||
private void OnDeleteObjectFromSecurityGroupOperationCompleted(object arg)
|
||||
{
|
||||
if ((this.DeleteUserFromSecurityGroupCompleted != null))
|
||||
if ((this.DeleteObjectFromSecurityGroupCompleted != null))
|
||||
{
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.DeleteUserFromSecurityGroupCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
this.DeleteObjectFromSecurityGroupCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1619,11 +1619,11 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
public delegate void AddUserToSecurityGroupCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
|
||||
public delegate void AddObjectToSecurityGroupCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
public delegate void DeleteUserFromSecurityGroupCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
|
||||
public delegate void DeleteObjectFromSecurityGroupCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
|
|
|
@ -135,15 +135,15 @@ namespace WebsitePanel.Server
|
|||
}
|
||||
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public void AddUserToSecurityGroup(string organizationId, string loginName, string groupName)
|
||||
public void AddObjectToSecurityGroup(string organizationId, string accountName, string groupName)
|
||||
{
|
||||
Organization.AddUserToSecurityGroup(organizationId, loginName, groupName);
|
||||
Organization.AddObjectToSecurityGroup(organizationId, accountName, groupName);
|
||||
}
|
||||
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public void DeleteUserFromSecurityGroup(string organizationId, string loginName, string groupName)
|
||||
public void DeleteObjectFromSecurityGroup(string organizationId, string accountName, string groupName)
|
||||
{
|
||||
Organization.DeleteUserFromSecurityGroup(organizationId, loginName, groupName);
|
||||
Organization.DeleteObjectFromSecurityGroup(organizationId, accountName, groupName);
|
||||
}
|
||||
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
|
|
|
@ -548,6 +548,7 @@
|
|||
<Control key="secur_groups" src="WebsitePanel/ExchangeServer/OrganizationSecurityGroups.ascx" title="OrganizationSecurityGroups" type="View" />
|
||||
<Control key="create_secur_group" src="WebsitePanel/ExchangeServer/OrganizationCreateSecurityGroup.ascx" title="OrganizationSecurityGroup" type="View" />
|
||||
<Control key="secur_group_settings" src="WebsitePanel/ExchangeServer/OrganizationSecurityGroupGeneralSettings.ascx" title="OrganizationSecurityGroup" type="View" />
|
||||
<Control key="secur_group_memberof" src="WebsitePanel/ExchangeServer/OrganizationSecurityGroupMemberOf.ascx" title="OrganizationSecurityGroupMemberOf" type="View" />
|
||||
|
||||
</Controls>
|
||||
</ModuleDefinition>
|
||||
|
|
|
@ -5328,5 +5328,19 @@
|
|||
</data>
|
||||
<data name="Quota.Lync.PhoneNumbers" xml:space="preserve">
|
||||
<value>Phone Numbers per Organization</value>
|
||||
<data name="Error.ORGANIZATION_CREATE_USER" xml:space="preserve">
|
||||
<value>Error creating user. See audit log for more details.</value>
|
||||
</data>
|
||||
<data name="Error.ORGANIZATION_CREATE_SECURITY_GROUP" xml:space="preserve">
|
||||
<value>Error creating security group. See audit log for more details.</value>
|
||||
</data>
|
||||
<data name="Error.ORGANIZATION_GET_SECURITY_GROUP_SETTINGS" xml:space="preserve">
|
||||
<value>Error reading group settings</value>
|
||||
</data>
|
||||
<data name="Error.ORGANIZATION_UPDATE_SECURITY_GROUP_SETTINGS" xml:space="preserve">
|
||||
<value>Error updating group settings</value>
|
||||
</data>
|
||||
<data name="Success.ORGANIZATION_UPDATE_SECURITY_GROUP_SETTINGS" xml:space="preserve">
|
||||
<value>Group general settings have been successfully updated.</value>
|
||||
</data>
|
||||
</root>
|
|
@ -0,0 +1,135 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="btnSave.OnClientClick" xml:space="preserve">
|
||||
<value>ShowProgressDialog('Updating...');</value>
|
||||
</data>
|
||||
<data name="btnSave.Text" xml:space="preserve">
|
||||
<value>Save Changes</value>
|
||||
</data>
|
||||
<data name="locTitle.Text" xml:space="preserve">
|
||||
<value>Edit Group </value>
|
||||
</data>
|
||||
<data name="secGeneral.Text" xml:space="preserve">
|
||||
<value>General</value>
|
||||
</data>
|
||||
<data name="Text.PageName" xml:space="preserve">
|
||||
<value>Groups</value>
|
||||
</data>
|
||||
</root>
|
|
@ -2,7 +2,7 @@
|
|||
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
|
||||
<%@ Register Src="UserControls/AccountsList.ascx" TagName="AccountsList" TagPrefix="wsp" %>
|
||||
<%@ Register Src="UserControls/MailboxSelector.ascx" TagName="MailboxSelector" TagPrefix="wsp" %>
|
||||
<%@ Register Src="UserControls/DistributionListTabs.ascx" TagName="DistributionListTabs" TagPrefix="wsp" %>
|
||||
<%@ Register Src="UserControls/SecurityGroupTabs.ascx" TagName="SecurityGroupTabs" TagPrefix="wsp" %>
|
||||
<%@ Register Src="UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %>
|
||||
<%@ Register Src="UserControls/Breadcrumb.ascx" TagName="Breadcrumb" TagPrefix="wsp" %>
|
||||
<%@ Register TagPrefix="wsp" TagName="CollapsiblePanel" Src="../UserControls/CollapsiblePanel.ascx" %>
|
||||
|
@ -27,15 +27,15 @@
|
|||
<asp:Literal ID="litDisplayName" runat="server" Text="John Smith" />
|
||||
</div>
|
||||
<div class="FormBody">
|
||||
<wsp:DistributionListTabs id="tabs" runat="server" SelectedTab="dlist_memberof" />
|
||||
<wsp:SecurityGroupTabs id="tabs" runat="server" SelectedTab="secur_group_memberof" />
|
||||
<wsp:SimpleMessageBox id="messageBox" runat="server" />
|
||||
|
||||
<wsp:CollapsiblePanel id="secDistributionLists" runat="server" TargetControlID="DistributionLists" meta:resourcekey="secDistributionLists" Text="Distribution Lists"></wsp:CollapsiblePanel>
|
||||
<asp:Panel ID="DistributionLists" runat="server" Height="0" style="overflow:hidden;">
|
||||
<wsp:CollapsiblePanel id="secGroups" runat="server" TargetControlID="GroupsPanel" meta:resourcekey="secGroups" Text="Groups"></wsp:CollapsiblePanel>
|
||||
<asp:Panel ID="GroupsPanel" runat="server" Height="0" style="overflow:hidden;">
|
||||
<asp:UpdatePanel ID="GeneralUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
|
||||
<ContentTemplate>
|
||||
|
||||
<wsp:AccountsList id="distrlists" runat="server"
|
||||
<wsp:AccountsList id="groups" runat="server"
|
||||
MailboxesEnabled="false"
|
||||
EnableMailboxOnly="true"
|
||||
ContactsEnabled="false"
|
||||
|
|
|
@ -67,7 +67,20 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
|
||||
ExchangeAccount[] dLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||
|
||||
distrlists.SetAccounts(dLists);
|
||||
ExchangeAccount[] secGroups = ES.Services.Organizations.GetSecurityGroupsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||
|
||||
List<ExchangeAccount> groupsList = new List<ExchangeAccount>();
|
||||
foreach (ExchangeAccount distList in dLists)
|
||||
{
|
||||
groupsList.Add(distList);
|
||||
}
|
||||
|
||||
foreach (ExchangeAccount secGroup in secGroups)
|
||||
{
|
||||
groupsList.Add(secGroup);
|
||||
}
|
||||
|
||||
groups.SetAccounts(groupsList.ToArray());
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
@ -83,18 +96,53 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
|
||||
try
|
||||
{
|
||||
ExchangeAccount[] oldDistributionLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||
List<string> newDistributionLists = new List<string>(distrlists.GetAccounts());
|
||||
foreach (ExchangeAccount oldlist in oldDistributionLists)
|
||||
ExchangeAccount[] oldSecGroups = ES.Services.Organizations.GetSecurityGroupsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||
ExchangeAccount[] oldDistLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||
|
||||
IList<ExchangeAccount> oldGroups = new List<ExchangeAccount>();
|
||||
foreach (ExchangeAccount distList in oldSecGroups)
|
||||
{
|
||||
if (newDistributionLists.Contains(oldlist.AccountName))
|
||||
newDistributionLists.Remove(oldlist.AccountName);
|
||||
else
|
||||
ES.Services.ExchangeServer.DeleteDistributionListMember(PanelRequest.ItemID, oldlist.AccountName, PanelRequest.AccountID);
|
||||
oldGroups.Add(distList);
|
||||
}
|
||||
|
||||
foreach (string newlist in newDistributionLists)
|
||||
ES.Services.ExchangeServer.AddDistributionListMember(PanelRequest.ItemID, newlist, PanelRequest.AccountID);
|
||||
foreach (ExchangeAccount secGroup in oldDistLists)
|
||||
{
|
||||
oldGroups.Add(secGroup);
|
||||
}
|
||||
|
||||
IDictionary<string, ExchangeAccountType> newGroups = groups.GetFullAccounts();
|
||||
foreach (ExchangeAccount oldGroup in oldGroups)
|
||||
{
|
||||
if (newGroups.ContainsKey(oldGroup.AccountName))
|
||||
{
|
||||
newGroups.Remove(oldGroup.AccountName);
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (oldGroup.AccountType)
|
||||
{
|
||||
case ExchangeAccountType.DistributionList:
|
||||
ES.Services.ExchangeServer.DeleteDistributionListMember(PanelRequest.ItemID, oldGroup.AccountName, PanelRequest.AccountID);
|
||||
break;
|
||||
case ExchangeAccountType.SecurityGroup:
|
||||
ES.Services.Organizations.DeleteObjectFromSecurityGroup(PanelRequest.ItemID, PanelRequest.AccountID, oldGroup.AccountName);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (KeyValuePair<string, ExchangeAccountType> newGroup in newGroups)
|
||||
{
|
||||
switch (newGroup.Value)
|
||||
{
|
||||
case ExchangeAccountType.DistributionList:
|
||||
ES.Services.ExchangeServer.AddDistributionListMember(PanelRequest.ItemID, newGroup.Key, PanelRequest.AccountID);
|
||||
break;
|
||||
case ExchangeAccountType.SecurityGroup:
|
||||
ES.Services.Organizations.AddObjectToSecurityGroup(PanelRequest.ItemID, PanelRequest.AccountID, newGroup.Key);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
messageBox.ShowSuccessMessage("EXCHANGE_UPDATE_DLIST_SETTINGS");
|
||||
BindSettings();
|
||||
|
|
|
@ -1,3 +1,31 @@
|
|||
// Copyright (c) 2012, Outercurve Foundation.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// - Redistributions of source code must retain the above copyright notice, this
|
||||
// list of conditions and the following disclaimer.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// 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
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
|
@ -73,7 +101,7 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.DistributionListTabs tabs;
|
||||
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.SecurityGroupTabs tabs;
|
||||
|
||||
/// <summary>
|
||||
/// messageBox control.
|
||||
|
@ -85,22 +113,22 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
|
||||
|
||||
/// <summary>
|
||||
/// secDistributionLists control.
|
||||
/// secGroups control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.CollapsiblePanel secDistributionLists;
|
||||
protected global::WebsitePanel.Portal.CollapsiblePanel secGroups;
|
||||
|
||||
/// <summary>
|
||||
/// DistributionLists control.
|
||||
/// GroupsPanel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Panel DistributionLists;
|
||||
protected global::System.Web.UI.WebControls.Panel GroupsPanel;
|
||||
|
||||
/// <summary>
|
||||
/// GeneralUpdatePanel control.
|
||||
|
@ -112,13 +140,13 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
protected global::System.Web.UI.UpdatePanel GeneralUpdatePanel;
|
||||
|
||||
/// <summary>
|
||||
/// distrlists control.
|
||||
/// groups control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.AccountsList distrlists;
|
||||
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.AccountsList groups;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave control.
|
||||
|
|
|
@ -32,12 +32,12 @@
|
|||
<wsp:MailboxTabs id="tabs" runat="server" SelectedTab="mailbox_memberof" />
|
||||
<wsp:SimpleMessageBox id="messageBox" runat="server" />
|
||||
|
||||
<wsp:CollapsiblePanel id="secDistributionLists" runat="server" TargetControlID="DistributionLists" meta:resourcekey="secDistributionLists" Text="Distribution Lists"></wsp:CollapsiblePanel>
|
||||
<asp:Panel ID="DistributionLists" runat="server" Height="0" style="overflow:hidden;">
|
||||
<wsp:CollapsiblePanel id="secGroups" runat="server" TargetControlID="GroupsPanel" meta:resourcekey="secGroups" Text="Groups"></wsp:CollapsiblePanel>
|
||||
<asp:Panel ID="GroupsPanel" runat="server" Height="0" style="overflow:hidden;">
|
||||
<asp:UpdatePanel ID="GeneralUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
|
||||
<ContentTemplate>
|
||||
|
||||
<wsp:AccountsList id="distrlists" runat="server"
|
||||
<wsp:AccountsList id="groups" runat="server"
|
||||
MailboxesEnabled="false"
|
||||
EnableMailboxOnly="true"
|
||||
ContactsEnabled="false"
|
||||
|
|
|
@ -59,10 +59,24 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
|
||||
// title
|
||||
litDisplayName.Text = mailbox.DisplayName;
|
||||
|
||||
//Distribution Lists
|
||||
ExchangeAccount[] dLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||
|
||||
distrlists.SetAccounts(dLists);
|
||||
//Security Groups
|
||||
ExchangeAccount[] securGroups = ES.Services.Organizations.GetSecurityGroupsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||
|
||||
List<ExchangeAccount> groupsList = new List<ExchangeAccount>();
|
||||
foreach (ExchangeAccount distList in dLists)
|
||||
{
|
||||
groupsList.Add(distList);
|
||||
}
|
||||
|
||||
foreach (ExchangeAccount secGroup in securGroups)
|
||||
{
|
||||
groupsList.Add(secGroup);
|
||||
}
|
||||
|
||||
groups.SetAccounts(groupsList.ToArray());
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
@ -78,18 +92,53 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
|
||||
try
|
||||
{
|
||||
ExchangeAccount[] oldDistributionLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||
List<string> newDistributionLists = new List<string>(distrlists.GetAccounts());
|
||||
foreach (ExchangeAccount oldlist in oldDistributionLists)
|
||||
ExchangeAccount[] oldSecGroups = ES.Services.Organizations.GetSecurityGroupsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||
ExchangeAccount[] oldDistLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||
|
||||
IList<ExchangeAccount> oldGroups = new List<ExchangeAccount>();
|
||||
foreach (ExchangeAccount distList in oldSecGroups)
|
||||
{
|
||||
if (newDistributionLists.Contains(oldlist.AccountName))
|
||||
newDistributionLists.Remove(oldlist.AccountName);
|
||||
else
|
||||
ES.Services.ExchangeServer.DeleteDistributionListMember(PanelRequest.ItemID, oldlist.AccountName, PanelRequest.AccountID);
|
||||
oldGroups.Add(distList);
|
||||
}
|
||||
|
||||
foreach (string newlist in newDistributionLists)
|
||||
ES.Services.ExchangeServer.AddDistributionListMember(PanelRequest.ItemID, newlist, PanelRequest.AccountID);
|
||||
foreach (ExchangeAccount secGroup in oldDistLists)
|
||||
{
|
||||
oldGroups.Add(secGroup);
|
||||
}
|
||||
|
||||
IDictionary<string, ExchangeAccountType> newGroups = groups.GetFullAccounts();
|
||||
foreach (ExchangeAccount oldGroup in oldGroups)
|
||||
{
|
||||
if (newGroups.ContainsKey(oldGroup.AccountName))
|
||||
{
|
||||
newGroups.Remove(oldGroup.AccountName);
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (oldGroup.AccountType)
|
||||
{
|
||||
case ExchangeAccountType.DistributionList:
|
||||
ES.Services.ExchangeServer.DeleteDistributionListMember(PanelRequest.ItemID, oldGroup.AccountName, PanelRequest.AccountID);
|
||||
break;
|
||||
case ExchangeAccountType.SecurityGroup:
|
||||
ES.Services.Organizations.DeleteObjectFromSecurityGroup(PanelRequest.ItemID, PanelRequest.AccountID, oldGroup.AccountName);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (KeyValuePair<string, ExchangeAccountType> newGroup in newGroups)
|
||||
{
|
||||
switch (newGroup.Value)
|
||||
{
|
||||
case ExchangeAccountType.DistributionList:
|
||||
ES.Services.ExchangeServer.AddDistributionListMember(PanelRequest.ItemID, newGroup.Key, PanelRequest.AccountID);
|
||||
break;
|
||||
case ExchangeAccountType.SecurityGroup:
|
||||
ES.Services.Organizations.AddObjectToSecurityGroup(PanelRequest.ItemID, PanelRequest.AccountID, newGroup.Key);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
messageBox.ShowSuccessMessage("EXCHANGE_UPDATE_MAILBOX_SETTINGS");
|
||||
BindSettings();
|
||||
|
@ -104,7 +153,5 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
{
|
||||
SaveSettings();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
|
@ -1,3 +1,31 @@
|
|||
// Copyright (c) 2012, Outercurve Foundation.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// - Redistributions of source code must retain the above copyright notice, this
|
||||
// list of conditions and the following disclaimer.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// 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
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
|
@ -85,22 +113,22 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
|
||||
|
||||
/// <summary>
|
||||
/// secDistributionLists control.
|
||||
/// secGroups control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.CollapsiblePanel secDistributionLists;
|
||||
protected global::WebsitePanel.Portal.CollapsiblePanel secGroups;
|
||||
|
||||
/// <summary>
|
||||
/// DistributionLists control.
|
||||
/// GroupsPanel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Panel DistributionLists;
|
||||
protected global::System.Web.UI.WebControls.Panel GroupsPanel;
|
||||
|
||||
/// <summary>
|
||||
/// GeneralUpdatePanel control.
|
||||
|
@ -112,13 +140,13 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
protected global::System.Web.UI.UpdatePanel GeneralUpdatePanel;
|
||||
|
||||
/// <summary>
|
||||
/// distrlists control.
|
||||
/// groups control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.AccountsList distrlists;
|
||||
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.AccountsList groups;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave control.
|
||||
|
|
|
@ -128,7 +128,7 @@ namespace WebsitePanel.Portal.HostedSolution
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
messageBox.ShowErrorMessage("EXCHANGE_CREATE_MAILBOX", ex);
|
||||
messageBox.ShowErrorMessage("ORGANIZATION_CREATE_USER", ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,59 @@
|
|||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="OrganizationSecurityGroupMemberOf.ascx.cs" Inherits="WebsitePanel.Portal.HostedSolution.OrganizationSecurityGroupMemberOf" %>
|
||||
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
|
||||
|
||||
<%@ Register Src="../UserControls/CollapsiblePanel.ascx" TagName="CollapsiblePanel" TagPrefix="wsp" %>
|
||||
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
|
||||
<%@ Register Src="UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %>
|
||||
<%@ Register Src="UserControls/Breadcrumb.ascx" TagName="Breadcrumb" TagPrefix="wsp" %>
|
||||
<%@ Register Src="UserControls/AccountsList.ascx" TagName="AccountsList" TagPrefix="wsp" %>
|
||||
<%@ Register Src="UserControls/SecurityGroupTabs.ascx" TagName="SecurityGroupTabs" TagPrefix="wsp"%>
|
||||
|
||||
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
|
||||
|
||||
<div id="ExchangeContainer">
|
||||
<div class="Module">
|
||||
<div class="Header">
|
||||
<wsp:Breadcrumb id="breadcrumb" runat="server" PageName="Text.PageName" />
|
||||
</div>
|
||||
<div class="Left">
|
||||
<wsp:Menu id="menu" runat="server" SelectedItem="mailboxes" />
|
||||
</div>
|
||||
<div class="Content">
|
||||
<div class="Center">
|
||||
<div class="Title">
|
||||
<asp:Image ID="Image1" SkinID="OrganizationUser48" runat="server" />
|
||||
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Edit User"></asp:Localize>
|
||||
-
|
||||
<asp:Literal ID="litDisplayName" runat="server" Text="John Smith" />
|
||||
</div>
|
||||
|
||||
<div class="FormBody">
|
||||
<wsp:SecurityGroupTabs id="tabs" runat="server" SelectedTab="secur_group_memberof" />
|
||||
<wsp:SimpleMessageBox id="messageBox" runat="server" />
|
||||
|
||||
<wsp:CollapsiblePanel id="secGroups" runat="server" TargetControlID="GroupsPanel" meta:resourcekey="secGroups" Text="Groups"></wsp:CollapsiblePanel>
|
||||
<asp:Panel ID="GroupsPanel" runat="server" Height="0" style="overflow:hidden;">
|
||||
<asp:UpdatePanel ID="GeneralUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
|
||||
<ContentTemplate>
|
||||
|
||||
<wsp:AccountsList id="groups" runat="server"
|
||||
MailboxesEnabled="false"
|
||||
EnableMailboxOnly="true"
|
||||
ContactsEnabled="false"
|
||||
DistributionListsEnabled="true"
|
||||
SecurityGroupsEnabled="true" />
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Panel>
|
||||
|
||||
<div class="FormFooterClean">
|
||||
<asp:Button id="btnSave" runat="server" Text="Save Changes" CssClass="Button1"
|
||||
meta:resourcekey="btnSave" ValidationGroup="EditMailbox" OnClick="btnSave_Click"></asp:Button>
|
||||
<asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True" ShowSummary="False" ValidationGroup="EditMailbox" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,141 @@
|
|||
// Copyright (c) 2012, Outercurve Foundation.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// - Redistributions of source code must retain the above copyright notice, this
|
||||
// list of conditions and the following disclaimer.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// 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
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
using System;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Collections.Generic;
|
||||
using WebsitePanel.EnterpriseServer;
|
||||
using WebsitePanel.Providers.HostedSolution;
|
||||
using WebsitePanel.Providers.ResultObjects;
|
||||
|
||||
namespace WebsitePanel.Portal.HostedSolution
|
||||
{
|
||||
public partial class OrganizationSecurityGroupMemberOf : WebsitePanelModuleBase
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
BindSettings();
|
||||
}
|
||||
}
|
||||
|
||||
private void BindSettings()
|
||||
{
|
||||
try
|
||||
{
|
||||
// get settings
|
||||
OrganizationSecurityGroup group = ES.Services.Organizations.GetSecurityGroupGeneralSettings(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||
//OrganizationUser user = ES.Services.Organizations.GetUserGeneralSettings(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||
|
||||
litDisplayName.Text = group.DisplayName;
|
||||
|
||||
//Distribution Lists
|
||||
ExchangeAccount[] dLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||
|
||||
//Security Groups
|
||||
ExchangeAccount[] securGroups = ES.Services.Organizations.GetSecurityGroupsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||
|
||||
List<ExchangeAccount> groupsList = new List<ExchangeAccount>();
|
||||
foreach (ExchangeAccount distList in dLists)
|
||||
{
|
||||
groupsList.Add(distList);
|
||||
}
|
||||
|
||||
foreach (ExchangeAccount secGroup in securGroups)
|
||||
{
|
||||
groupsList.Add(secGroup);
|
||||
}
|
||||
|
||||
groups.SetAccounts(groupsList.ToArray());
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
messageBox.ShowErrorMessage("ORGANIZATION_GET_GROUP_SETTINGS", ex);
|
||||
}
|
||||
}
|
||||
|
||||
private void SaveSettings()
|
||||
{
|
||||
if (!Page.IsValid)
|
||||
return;
|
||||
|
||||
try
|
||||
{
|
||||
ExchangeAccount[] oldSecGroups = ES.Services.Organizations.GetSecurityGroupsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||
ExchangeAccount[] oldDistLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||
|
||||
IList<ExchangeAccount> oldGroups = new List<ExchangeAccount>();
|
||||
foreach (ExchangeAccount distList in oldSecGroups)
|
||||
{
|
||||
oldGroups.Add(distList);
|
||||
}
|
||||
|
||||
foreach (ExchangeAccount secGroup in oldDistLists)
|
||||
{
|
||||
oldGroups.Add(secGroup);
|
||||
}
|
||||
|
||||
IDictionary<string, ExchangeAccountType> newGroups = groups.GetFullAccounts();
|
||||
foreach (ExchangeAccount oldGroup in oldGroups)
|
||||
{
|
||||
if (newGroups.ContainsKey(oldGroup.AccountName))
|
||||
{
|
||||
newGroups.Remove(oldGroup.AccountName);
|
||||
}
|
||||
else
|
||||
{
|
||||
ES.Services.Organizations.DeleteObjectFromSecurityGroup(PanelRequest.ItemID, PanelRequest.AccountID, oldGroup.AccountName);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (KeyValuePair<string, ExchangeAccountType> newGroup in newGroups)
|
||||
{
|
||||
ES.Services.Organizations.AddObjectToSecurityGroup(PanelRequest.ItemID, PanelRequest.AccountID, newGroup.Key);
|
||||
}
|
||||
|
||||
messageBox.ShowSuccessMessage("ORGANIZATION_UPDATE_SECURITY_GROUP_SETTINGS");
|
||||
|
||||
|
||||
BindSettings();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
messageBox.ShowErrorMessage("ORGANIZATION_UPDATE_SECURITY_GROUP_SETTINGS", ex);
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
SaveSettings();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,169 @@
|
|||
// Copyright (c) 2012, Outercurve Foundation.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// - Redistributions of source code must retain the above copyright notice, this
|
||||
// list of conditions and the following disclaimer.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// 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
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebsitePanel.Portal.HostedSolution {
|
||||
|
||||
|
||||
public partial class OrganizationSecurityGroupMemberOf {
|
||||
|
||||
/// <summary>
|
||||
/// asyncTasks control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks;
|
||||
|
||||
/// <summary>
|
||||
/// breadcrumb control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Breadcrumb breadcrumb;
|
||||
|
||||
/// <summary>
|
||||
/// menu control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Menu menu;
|
||||
|
||||
/// <summary>
|
||||
/// Image1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Image Image1;
|
||||
|
||||
/// <summary>
|
||||
/// locTitle control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize locTitle;
|
||||
|
||||
/// <summary>
|
||||
/// litDisplayName control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Literal litDisplayName;
|
||||
|
||||
/// <summary>
|
||||
/// tabs control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.SecurityGroupTabs tabs;
|
||||
|
||||
/// <summary>
|
||||
/// messageBox control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
|
||||
|
||||
/// <summary>
|
||||
/// secGroups control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.CollapsiblePanel secGroups;
|
||||
|
||||
/// <summary>
|
||||
/// GroupsPanel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Panel GroupsPanel;
|
||||
|
||||
/// <summary>
|
||||
/// GeneralUpdatePanel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.UpdatePanel GeneralUpdatePanel;
|
||||
|
||||
/// <summary>
|
||||
/// groups control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.AccountsList groups;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// ValidationSummary1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.ValidationSummary ValidationSummary1;
|
||||
}
|
||||
}
|
|
@ -43,27 +43,17 @@
|
|||
<uc1:MailboxTabs ID="MailboxTabsId" runat="server" SelectedTab="user_memberof" />
|
||||
<wsp:SimpleMessageBox id="messageBox" runat="server" />
|
||||
|
||||
<wsp:CollapsiblePanel id="secDistributionLists" runat="server" TargetControlID="DistributionListsPanel" meta:resourcekey="secDistributionLists" Text="Distribution Lists"></wsp:CollapsiblePanel>
|
||||
<asp:Panel ID="DistributionListsPanel" runat="server" Height="0" style="overflow:hidden;">
|
||||
<asp:UpdatePanel ID="DLGeneralUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
|
||||
<wsp:CollapsiblePanel id="secGroups" runat="server" TargetControlID="GroupsPanel" meta:resourcekey="secGroups" Text="Groups"></wsp:CollapsiblePanel>
|
||||
<asp:Panel ID="GroupsPanel" runat="server" Height="0" style="overflow:hidden;">
|
||||
<asp:UpdatePanel ID="GeneralUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
|
||||
<ContentTemplate>
|
||||
|
||||
<wsp:AccountsList id="distrlists" runat="server"
|
||||
<wsp:AccountsList id="groups" runat="server"
|
||||
MailboxesEnabled="false"
|
||||
EnableMailboxOnly="true"
|
||||
ContactsEnabled="false"
|
||||
DistributionListsEnabled="true" />
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Panel>
|
||||
|
||||
<wsp:CollapsiblePanel id="secSecurityGroups" runat="server" TargetControlID="SecurityGroupsPanel" meta:resourcekey="secSecurityGroups" Text="Groups"></wsp:CollapsiblePanel>
|
||||
<asp:Panel ID="SecurityGroupsPanel" runat="server" Height="0" style="overflow:hidden;">
|
||||
<asp:UpdatePanel ID="SCGeneralUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
|
||||
<ContentTemplate>
|
||||
|
||||
<wsp:GroupsList id="securegroups" runat="server" />
|
||||
DistributionListsEnabled="true"
|
||||
SecurityGroupsEnabled="true" />
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
|
|
@ -44,6 +44,7 @@ namespace WebsitePanel.Portal.HostedSolution
|
|||
BindSettings();
|
||||
|
||||
MailboxTabsId.Visible = (PanelRequest.Context == "Mailbox");
|
||||
|
||||
UserTabsId.Visible = (PanelRequest.Context == "User");
|
||||
}
|
||||
}
|
||||
|
@ -53,26 +54,37 @@ namespace WebsitePanel.Portal.HostedSolution
|
|||
try
|
||||
{
|
||||
// get settings
|
||||
ExchangeMailbox mailbox = ES.Services.ExchangeServer.GetMailboxGeneralSettings(PanelRequest.ItemID,
|
||||
PanelRequest.AccountID);
|
||||
OrganizationUser user = ES.Services.Organizations.GetUserGeneralSettings(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||
|
||||
// title
|
||||
litDisplayName.Text = mailbox.DisplayName;
|
||||
groups.DistributionListsEnabled = (user.AccountType == ExchangeAccountType.Mailbox
|
||||
|| user.AccountType == ExchangeAccountType.Room
|
||||
|| user.AccountType == ExchangeAccountType.Equipment);
|
||||
|
||||
litDisplayName.Text = user.DisplayName;
|
||||
|
||||
//Distribution Lists
|
||||
ExchangeAccount[] dLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||
|
||||
distrlists.SetAccounts(dLists);
|
||||
|
||||
//Security Groups
|
||||
ExchangeAccount[] securGroups = ES.Services.Organizations.GetSecurityGroupsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||
|
||||
securegroups.SetAccounts(securGroups);
|
||||
List<ExchangeAccount> groupsList = new List<ExchangeAccount>();
|
||||
foreach (ExchangeAccount distList in dLists)
|
||||
{
|
||||
groupsList.Add(distList);
|
||||
}
|
||||
|
||||
foreach (ExchangeAccount secGroup in securGroups)
|
||||
{
|
||||
groupsList.Add(secGroup);
|
||||
}
|
||||
|
||||
groups.SetAccounts(groupsList.ToArray());
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
messageBox.ShowErrorMessage("EXCHANGE_GET_MAILBOX_SETTINGS", ex);
|
||||
messageBox.ShowErrorMessage("ORGANIZATION_GET_USER_SETTINGS", ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -83,48 +95,62 @@ namespace WebsitePanel.Portal.HostedSolution
|
|||
|
||||
try
|
||||
{
|
||||
//Distribution Lists
|
||||
ExchangeAccount[] oldDistributionLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||
List<string> newDistributionLists = new List<string>(distrlists.GetAccounts());
|
||||
foreach (ExchangeAccount oldlist in oldDistributionLists)
|
||||
ExchangeAccount[] oldSecGroups = ES.Services.Organizations.GetSecurityGroupsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||
ExchangeAccount[] oldDistLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||
|
||||
IList<ExchangeAccount> oldGroups = new List<ExchangeAccount>();
|
||||
foreach (ExchangeAccount distList in oldSecGroups)
|
||||
{
|
||||
if (newDistributionLists.Contains(oldlist.AccountName))
|
||||
newDistributionLists.Remove(oldlist.AccountName);
|
||||
else
|
||||
ES.Services.ExchangeServer.DeleteDistributionListMember(PanelRequest.ItemID, oldlist.AccountName, PanelRequest.AccountID);
|
||||
oldGroups.Add(distList);
|
||||
}
|
||||
|
||||
foreach (string newlist in newDistributionLists)
|
||||
ES.Services.ExchangeServer.AddDistributionListMember(PanelRequest.ItemID, newlist, PanelRequest.AccountID);
|
||||
|
||||
//Security Groups
|
||||
ExchangeAccount[] oldDSecurityGroups = ES.Services.Organizations.GetSecurityGroupsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||
List<string> newSecurityGroups = new List<string>(securegroups.GetAccounts());
|
||||
foreach (ExchangeAccount oldgroup in oldDSecurityGroups)
|
||||
foreach (ExchangeAccount secGroup in oldDistLists)
|
||||
{
|
||||
if (newSecurityGroups.Contains(oldgroup.AccountName))
|
||||
oldGroups.Add(secGroup);
|
||||
}
|
||||
|
||||
IDictionary<string, ExchangeAccountType> newGroups = groups.GetFullAccounts();
|
||||
foreach (ExchangeAccount oldGroup in oldGroups)
|
||||
{
|
||||
if (newGroups.ContainsKey(oldGroup.AccountName))
|
||||
{
|
||||
newSecurityGroups.Remove(oldgroup.AccountName);
|
||||
newGroups.Remove(oldGroup.AccountName);
|
||||
}
|
||||
else
|
||||
{
|
||||
ES.Services.Organizations.DeleteUserFromSecurityGroup(PanelRequest.ItemID, PanelRequest.AccountID, oldgroup.AccountName);
|
||||
switch (oldGroup.AccountType)
|
||||
{
|
||||
case ExchangeAccountType.DistributionList:
|
||||
ES.Services.ExchangeServer.DeleteDistributionListMember(PanelRequest.ItemID, oldGroup.AccountName, PanelRequest.AccountID);
|
||||
break;
|
||||
case ExchangeAccountType.SecurityGroup:
|
||||
ES.Services.Organizations.DeleteObjectFromSecurityGroup(PanelRequest.ItemID, PanelRequest.AccountID, oldGroup.AccountName);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (string newgroup in newSecurityGroups)
|
||||
foreach (KeyValuePair<string, ExchangeAccountType> newGroup in newGroups)
|
||||
{
|
||||
ES.Services.Organizations.AddUserToSecurityGroup(PanelRequest.ItemID, PanelRequest.AccountID, newgroup);
|
||||
switch (newGroup.Value)
|
||||
{
|
||||
case ExchangeAccountType.DistributionList:
|
||||
ES.Services.ExchangeServer.AddDistributionListMember(PanelRequest.ItemID, newGroup.Key, PanelRequest.AccountID);
|
||||
break;
|
||||
case ExchangeAccountType.SecurityGroup:
|
||||
ES.Services.Organizations.AddObjectToSecurityGroup(PanelRequest.ItemID, PanelRequest.AccountID, newGroup.Key);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
messageBox.ShowSuccessMessage("EXCHANGE_UPDATE_MAILBOX_SETTINGS");
|
||||
messageBox.ShowSuccessMessage("ORGANIZATION_UPDATE_USER_SETTINGS");
|
||||
|
||||
|
||||
BindSettings();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
messageBox.ShowErrorMessage("EXCHANGE_UPDATE_MAILBOX_SETTINGS", ex);
|
||||
messageBox.ShowErrorMessage("ORGANIZATION_UPDATE_USER_SETTINGS", ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -123,76 +123,40 @@ namespace WebsitePanel.Portal.HostedSolution {
|
|||
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
|
||||
|
||||
/// <summary>
|
||||
/// secDistributionLists control.
|
||||
/// secGroups control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.CollapsiblePanel secDistributionLists;
|
||||
protected global::WebsitePanel.Portal.CollapsiblePanel secGroups;
|
||||
|
||||
/// <summary>
|
||||
/// DistributionListsPanel control.
|
||||
/// GroupsPanel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Panel DistributionListsPanel;
|
||||
protected global::System.Web.UI.WebControls.Panel GroupsPanel;
|
||||
|
||||
/// <summary>
|
||||
/// DLGeneralUpdatePanel control.
|
||||
/// GeneralUpdatePanel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.UpdatePanel DLGeneralUpdatePanel;
|
||||
protected global::System.Web.UI.UpdatePanel GeneralUpdatePanel;
|
||||
|
||||
/// <summary>
|
||||
/// distrlists control.
|
||||
/// groups control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.AccountsList distrlists;
|
||||
|
||||
/// <summary>
|
||||
/// secSecurityGroups control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.CollapsiblePanel secSecurityGroups;
|
||||
|
||||
/// <summary>
|
||||
/// SecurityGroupsPanel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Panel SecurityGroupsPanel;
|
||||
|
||||
/// <summary>
|
||||
/// SCGeneralUpdatePanel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.UpdatePanel SCGeneralUpdatePanel;
|
||||
|
||||
/// <summary>
|
||||
/// securegroups control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.GroupsList securegroups;
|
||||
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.AccountsList groups;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave control.
|
||||
|
|
|
@ -37,6 +37,13 @@
|
|||
<asp:Literal ID="litPrimaryEmailAddress" runat="server" Text='<%# Eval("PrimaryEmailAddress") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField meta:resourcekey="gvAccountsAccountType" HeaderText="gvAccountsAccountType">
|
||||
<HeaderStyle Wrap="false" />
|
||||
<ItemStyle Width="50%" Wrap="false"></ItemStyle>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="litType" runat="server" Text='<%# GetType((int)Eval("AccountType")) %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
|
@ -111,6 +118,12 @@
|
|||
<asp:Literal ID="litPrimaryEmailAddress" runat="server" Text='<%# Eval("PrimaryEmailAddress") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField meta:resourcekey="gvAccountsAccountType" HeaderText="gvAccountsAccountType">
|
||||
<ItemStyle Width="50%"></ItemStyle>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="litType" runat="server" Text='<%# GetType((int)Eval("AccountType")) %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
@ -83,16 +84,31 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
BindAccounts(accounts, false);
|
||||
}
|
||||
|
||||
public string[] GetAccounts()
|
||||
public string[] GetAccounts()
|
||||
{
|
||||
// get selected accounts
|
||||
List<ExchangeAccount> selectedAccounts = GetGridViewAccounts(gvAccounts, SelectedState.All);
|
||||
|
||||
List<string> accountNames = new List<string>();
|
||||
foreach (ExchangeAccount account in selectedAccounts)
|
||||
accountNames.Add(account.AccountName);
|
||||
|
||||
return accountNames.ToArray();
|
||||
}
|
||||
|
||||
public IDictionary<string, ExchangeAccountType> GetFullAccounts()
|
||||
{
|
||||
// get selected accounts
|
||||
List<ExchangeAccount> selectedAccounts = GetGridViewAccounts(gvAccounts, SelectedState.All);
|
||||
|
||||
List<string> accountNames = new List<string>();
|
||||
foreach (ExchangeAccount account in selectedAccounts)
|
||||
accountNames.Add(account.AccountName);
|
||||
IDictionary<string, ExchangeAccountType> accounts = new Dictionary<string, ExchangeAccountType>();
|
||||
|
||||
return accountNames.ToArray();
|
||||
foreach (ExchangeAccount account in selectedAccounts)
|
||||
{
|
||||
accounts.Add(account.AccountName, account.AccountType);
|
||||
}
|
||||
|
||||
return accounts;
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
|
@ -118,6 +134,8 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
|
||||
chkIncludeGroups.Visible = SecurityGroupsEnabled;
|
||||
chkIncludeGroups.Checked = SecurityGroupsEnabled;
|
||||
|
||||
gvAccounts.Columns[3].Visible = gvPopupAccounts.Columns[3].Visible = SecurityGroupsEnabled;
|
||||
}
|
||||
|
||||
// register javascript
|
||||
|
@ -142,18 +160,35 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
string imgName = "mailbox_16.gif";
|
||||
if (accountType == ExchangeAccountType.Contact)
|
||||
imgName = "contact_16.gif";
|
||||
else if (accountType == ExchangeAccountType.DistributionList)
|
||||
else if (accountType == ExchangeAccountType.DistributionList
|
||||
|| accountType == ExchangeAccountType.SecurityGroup
|
||||
|| accountType == ExchangeAccountType.DefaultSecurityGroup)
|
||||
imgName = "dlist_16.gif";
|
||||
else if (accountType == ExchangeAccountType.Room)
|
||||
imgName = "room_16.gif";
|
||||
else if (accountType == ExchangeAccountType.Equipment)
|
||||
imgName = "equipment_16.gif";
|
||||
else if (accountType == ExchangeAccountType.Equipment)
|
||||
imgName = "dlist_16.gif";
|
||||
|
||||
return GetThemedImage("Exchange/" + imgName);
|
||||
}
|
||||
|
||||
public string GetType(int accountTypeId)
|
||||
{
|
||||
ExchangeAccountType accountType = (ExchangeAccountType)accountTypeId;
|
||||
|
||||
switch(accountType)
|
||||
{
|
||||
case ExchangeAccountType.DistributionList:
|
||||
return "Distribution";
|
||||
case ExchangeAccountType.SecurityGroup:
|
||||
return "Security";
|
||||
case ExchangeAccountType.DefaultSecurityGroup:
|
||||
return "Default";
|
||||
default:
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnAdd_Click(object sender, EventArgs e)
|
||||
{
|
||||
// bind all accounts
|
||||
|
@ -188,6 +223,11 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
chkIncludeRooms.Checked, chkIncludeEquipment.Checked, chkIncludeGroups.Checked,
|
||||
ddlSearchColumn.SelectedValue, txtSearchValue.Text + "%", "");
|
||||
|
||||
if (SecurityGroupsEnabled)
|
||||
{
|
||||
accounts = accounts.Where(x => !GetAccounts().Contains(x.AccountName)).ToArray();
|
||||
}
|
||||
|
||||
if (ExcludeAccountId > 0)
|
||||
{
|
||||
List<ExchangeAccount> updatedAccounts = new List<ExchangeAccount>();
|
||||
|
@ -200,6 +240,11 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
|
||||
gvPopupAccounts.DataSource = accounts;
|
||||
gvPopupAccounts.DataBind();
|
||||
|
||||
if (gvPopupAccounts.Rows.Count > 0)
|
||||
{
|
||||
UpdateGridViewAccounts(gvPopupAccounts);
|
||||
}
|
||||
}
|
||||
|
||||
private void BindAccounts(ExchangeAccount[] newAccounts, bool preserveExisting)
|
||||
|
@ -235,6 +280,11 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
gvAccounts.DataSource = accounts;
|
||||
gvAccounts.DataBind();
|
||||
|
||||
if (gvAccounts.Rows.Count > 0)
|
||||
{
|
||||
UpdateGridViewAccounts(gvAccounts);
|
||||
}
|
||||
|
||||
btnDelete.Visible = gvAccounts.Rows.Count > 0;
|
||||
}
|
||||
|
||||
|
@ -262,6 +312,38 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
return accounts;
|
||||
}
|
||||
|
||||
private void UpdateGridViewAccounts(GridView gv)
|
||||
{
|
||||
CheckBox chkSelectAll = (CheckBox)gv.HeaderRow.FindControl("chkSelectAll");
|
||||
|
||||
for (int i = 0; i < gv.Rows.Count; i++)
|
||||
{
|
||||
GridViewRow row = gv.Rows[i];
|
||||
CheckBox chkSelect = (CheckBox)row.FindControl("chkSelect");
|
||||
if (chkSelect == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
ExchangeAccountType exAccountType = (ExchangeAccountType)Enum.Parse(typeof(ExchangeAccountType), ((Literal)row.FindControl("litAccountType")).Text);
|
||||
|
||||
if (exAccountType != ExchangeAccountType.DefaultSecurityGroup)
|
||||
{
|
||||
chkSelectAll = null;
|
||||
chkSelect.Enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
chkSelect.Enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (chkSelectAll != null)
|
||||
{
|
||||
chkSelectAll.Enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
protected void chkIncludeMailboxes_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
BindPopupAccounts();
|
||||
|
|
|
@ -156,6 +156,9 @@
|
|||
<data name="gvAccounts.EmptyDataText" xml:space="preserve">
|
||||
<value>The list of accounts is empty. Click "Add..." button to add accounts.</value>
|
||||
</data>
|
||||
<data name="gvAccountsAccountType.HeaderText" xml:space="preserve">
|
||||
<value>Type</value>
|
||||
</data>
|
||||
<data name="gvAccountsDisplayName.HeaderText" xml:space="preserve">
|
||||
<value>Display Name</value>
|
||||
</data>
|
||||
|
|
|
@ -153,6 +153,9 @@
|
|||
<data name="gvAccounts.EmptyDataText" xml:space="preserve">
|
||||
<value>The list of accounts is empty. Click "Add..." button to add accounts.</value>
|
||||
</data>
|
||||
<data name="gvAccountsAccountType.HeaderText" xml:space="preserve">
|
||||
<value>Type</value>
|
||||
</data>
|
||||
<data name="gvAccountsDisplayName.HeaderText" xml:space="preserve">
|
||||
<value>Display Name</value>
|
||||
</data>
|
||||
|
@ -163,7 +166,7 @@
|
|||
<value>No accounts found.</value>
|
||||
</data>
|
||||
<data name="headerAddAccounts.Text" xml:space="preserve">
|
||||
<value>Organization Users</value>
|
||||
<value>Organization Accounts</value>
|
||||
</data>
|
||||
<data name="locIncludeSearch.Text" xml:space="preserve">
|
||||
<value>Include in search:</value>
|
||||
|
|
|
@ -216,7 +216,6 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
{
|
||||
chkSelectAll.Enabled = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected void chkIncludeMailboxes_CheckedChanged(object sender, EventArgs e)
|
||||
|
|
|
@ -53,6 +53,7 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
{
|
||||
List<Tab> tabsList = new List<Tab>();
|
||||
tabsList.Add(CreateTab("secur_group_settings", "Tab.Settings"));
|
||||
tabsList.Add(CreateTab("secur_group_memberof", "Tab.MemberOf"));
|
||||
|
||||
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
</asp:TemplateField>
|
||||
<asp:TemplateField meta:resourcekey="gvAccountsDisplayName" HeaderText="gvAccountsDisplayName">
|
||||
<HeaderStyle Wrap="false" />
|
||||
<ItemStyle Width="50%" Wrap="false"></ItemStyle>
|
||||
<ItemStyle Width="34%" Wrap="false"></ItemStyle>
|
||||
<ItemTemplate>
|
||||
<asp:Image ID="img1" runat="server" ImageUrl='<%# GetAccountImage((int)Eval("AccountType")) %>' ImageAlign="AbsMiddle" />
|
||||
<asp:Literal ID="litDisplayName" runat="server" Text='<%# Eval("DisplayName") %>'></asp:Literal>
|
||||
|
@ -31,11 +31,18 @@
|
|||
</asp:TemplateField>
|
||||
<asp:TemplateField meta:resourcekey="gvAccountsEmail" HeaderText="gvAccountsEmail">
|
||||
<HeaderStyle Wrap="false" />
|
||||
<ItemStyle Width="50%" Wrap="false"></ItemStyle>
|
||||
<ItemStyle Width="33%" Wrap="false"></ItemStyle>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="litPrimaryEmailAddress" runat="server" Text='<%# Eval("PrimaryEmailAddress") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField meta:resourcekey="gvAccountsAccountType" HeaderText="gvAccountsAccountType">
|
||||
<HeaderStyle Wrap="false" />
|
||||
<ItemStyle Width="33%" Wrap="false"></ItemStyle>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="litType" runat="server" Text='<%# GetType((int)Eval("AccountType")) %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
|
@ -83,18 +90,24 @@
|
|||
<ItemStyle Width="10px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField meta:resourcekey="gvAccountsDisplayName">
|
||||
<ItemStyle Width="50%"></ItemStyle>
|
||||
<ItemStyle Width="34%"></ItemStyle>
|
||||
<ItemTemplate>
|
||||
<asp:Image ID="img1" runat="server" ImageUrl='<%# GetAccountImage((int)Eval("AccountType")) %>' ImageAlign="AbsMiddle" />
|
||||
<asp:Literal ID="litDisplayName" runat="server" Text='<%# Eval("DisplayName") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField meta:resourcekey="gvAccountsEmail">
|
||||
<ItemStyle Width="50%"></ItemStyle>
|
||||
<ItemStyle Width="33%"></ItemStyle>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="litPrimaryEmailAddress" runat="server" Text='<%# Eval("PrimaryEmailAddress") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField meta:resourcekey="gvAccountsAccountType" HeaderText="gvAccountsAccountType">
|
||||
<ItemStyle Width="33%"></ItemStyle>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="litType" runat="server" Text='<%# GetType((int)Eval("AccountType")) %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
|
|
|
@ -139,9 +139,15 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
case ExchangeAccountType.Equipment:
|
||||
imgName = "equipment_16.gif";
|
||||
break;
|
||||
case ExchangeAccountType.DistributionList:
|
||||
imgName = "dlist_16.gif";
|
||||
break;
|
||||
case ExchangeAccountType.SecurityGroup:
|
||||
imgName = "dlist_16.gif";
|
||||
break;
|
||||
case ExchangeAccountType.DefaultSecurityGroup:
|
||||
imgName = "dlist_16.gif";
|
||||
break;
|
||||
default:
|
||||
imgName = "admin_16.png";
|
||||
break;
|
||||
|
@ -150,6 +156,23 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
return GetThemedImage("Exchange/" + imgName);
|
||||
}
|
||||
|
||||
public string GetType(int accountTypeId)
|
||||
{
|
||||
ExchangeAccountType accountType = (ExchangeAccountType)accountTypeId;
|
||||
|
||||
switch (accountType)
|
||||
{
|
||||
case ExchangeAccountType.DistributionList:
|
||||
return "Distribution";
|
||||
case ExchangeAccountType.SecurityGroup:
|
||||
return "Security";
|
||||
case ExchangeAccountType.DefaultSecurityGroup:
|
||||
return "Default Group";
|
||||
default:
|
||||
return accountType.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
private void BindPopupAccounts()
|
||||
{
|
||||
ExchangeAccount[] accounts = ES.Services.Organizations.SearchOrganizationAccounts(PanelRequest.ItemID,
|
||||
|
|
|
@ -209,6 +209,13 @@
|
|||
<Compile Include="Code\ReportingServices\IResourceStorage.cs" />
|
||||
<Compile Include="Code\ReportingServices\ReportingServicesUtils.cs" />
|
||||
<Compile Include="Code\UserControls\Tab.cs" />
|
||||
<Compile Include="ExchangeServer\OrganizationSecurityGroupMemberOf.ascx.cs">
|
||||
<DependentUpon>OrganizationSecurityGroupMemberOf.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ExchangeServer\OrganizationSecurityGroupMemberOf.ascx.designer.cs">
|
||||
<DependentUpon>OrganizationSecurityGroupMemberOf.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ExchangeServer\ExchangeDistributionListMemberOf.ascx.cs">
|
||||
<DependentUpon>ExchangeDistributionListMemberOf.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
@ -3973,6 +3980,7 @@
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="ApplyEnableHardQuotaFeature.ascx" />
|
||||
<Content Include="ExchangeServer\OrganizationSecurityGroupMemberOf.ascx" />
|
||||
<Content Include="ExchangeServer\ExchangeDistributionListMemberOf.ascx" />
|
||||
<Content Include="ExchangeServer\ExchangeMailboxMemberOf.ascx" />
|
||||
<Content Include="ExchangeServer\OrganizationAddDomainName.ascx" />
|
||||
|
@ -5200,6 +5208,7 @@
|
|||
<Content Include="ExchangeServer\UserControls\App_LocalResources\GroupsList.ascx.resx">
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
<Content Include="ExchangeServer\App_LocalResources\OrganizationSecurityGroupMemberOf.ascx.resx" />
|
||||
<EmbeddedResource Include="UserControls\App_LocalResources\EditDomainsList.ascx.resx">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue