diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/OrganizationProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/OrganizationProxy.cs index 5df3b637..d2c60dd8 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/OrganizationProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/OrganizationProxy.cs @@ -127,6 +127,8 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution private System.Threading.SendOrPostCallback GetOrganizationSecurityGroupsPagedOperationCompleted; + private System.Threading.SendOrPostCallback AddUserToSecurityGroupOperationCompleted; + /// public esOrganizations() { @@ -226,6 +228,9 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution /// public event GetOrganizationSecurityGroupsPagedCompletedEventHandler GetOrganizationSecurityGroupsPagedCompleted; + /// + public event AddUserToSecurityGroupCompletedEventHandler AddUserToSecurityGroupCompleted; + /// [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/CheckOrgIdExists", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] public bool CheckOrgIdExists(string orgId) @@ -2151,6 +2156,61 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution } } + /// + [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, int groupAccountId) + { + object[] results = this.Invoke("AddUserToSecurityGroup", new object[] { + itemId, + userAccountId, + groupAccountId}); + return ((int)(results[0])); + } + + /// + public System.IAsyncResult BeginAddUserToSecurityGroup(int itemId, int userAccountId, int groupAccountId, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("AddUserToSecurityGroup", new object[] { + itemId, + userAccountId, + groupAccountId}, callback, asyncState); + } + + /// + public int EndAddUserToSecurityGroup(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((int)(results[0])); + } + + /// + public void AddUserToSecurityGroupAsync(int itemId, int userAccountId, int groupAccountId) + { + this.AddUserToSecurityGroupAsync(itemId, userAccountId, groupAccountId, null); + } + + /// + public void AddUserToSecurityGroupAsync(int itemId, int userAccountId, int groupAccountId, object userState) + { + if ((this.AddUserToSecurityGroupOperationCompleted == null)) + { + this.AddUserToSecurityGroupOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddUserToSecurityGroupOperationCompleted); + } + this.InvokeAsync("AddUserToSecurityGroup", new object[] { + itemId, + userAccountId, + groupAccountId}, this.AddUserToSecurityGroupOperationCompleted, userState); + } + + private void OnAddUserToSecurityGroupOperationCompleted(object arg) + { + if ((this.AddUserToSecurityGroupCompleted != 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)); + } + } + /// public new void CancelAsync(object userState) { @@ -3087,4 +3147,34 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution } } } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + public delegate void AddUserToSecurityGroupCompletedEventHandler(object sender, AddUserToSecurityGroupCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class AddUserToSecurityGroupCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal AddUserToSecurityGroupCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/OrganizationController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/OrganizationController.cs index bd36e12d..9f87df13 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/OrganizationController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/OrganizationController.cs @@ -371,6 +371,11 @@ namespace WebsitePanel.EnterpriseServer // register domain DataProvider.AddExchangeOrganizationDomain(itemId, domainId, true); + //add to exchangeAcounts + AddAccount(itemId, ExchangeAccountType.DefaultSecurityGroup, org.GroupName, + org.GroupName, null, false, + 0, org.GroupName, null, 0, null); + // register organization domain service item OrganizationDomain orgDomain = new OrganizationDomain { @@ -1718,61 +1723,6 @@ namespace WebsitePanel.EnterpriseServer return (account); } - - private static OrganizationSecurityGroup GetDemoSecurityGroupGeneralSettings() - { - OrganizationSecurityGroup c = new OrganizationSecurityGroup(); - c.DisplayName = "Fabrikam Sales"; - c.AccountName = "sales_fabrikam"; - - return c; - } - - public static OrganizationSecurityGroup GetSecurityGroupGeneralSettings(int itemId, int accountId) - { - #region Demo Mode - if (IsDemoMode) - { - return GetDemoSecurityGroupGeneralSettings(); - } - #endregion - - // place log record - TaskManager.StartTask("ORGANIZATION", "GET_SECURITY_GROUP_GENERAL", itemId); - - try - { - // load organization - Organization org = GetOrganization(itemId); - if (org == null) - return null; - - OrganizationUser account = GetAccount(itemId, accountId); - - // get mailbox settings - Organizations orgProxy = GetOrganizationProxy(org.ServiceId); - - OrganizationSecurityGroup securityGroup = orgProxy.GetSecurityGroupGeneralSettings("test2.com"/*account.AccountName*/, org.OrganizationId); - - return securityGroup; - - /*foreach (OrganizationUser user in securityGroup.MembersAccounts) - { - OrganizationUser userAccount = GetAccount(itemId, user.SamAccountName); - - user.AccountId = user - }*/ - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - public static int SetUserGeneralSettings(int itemId, int accountId, string displayName, string password, bool hideAddressBook, bool disabled, bool locked, string firstName, string initials, string lastName, string address, string city, string state, string zip, string country, @@ -2307,18 +2257,16 @@ namespace WebsitePanel.EnterpriseServer Organizations orgProxy = GetOrganizationProxy(org.ServiceId); - string accountName = BuildAccountName(org.OrganizationId, displayName, org.ServiceId); + TaskManager.Write("accountName :" + displayName); - TaskManager.Write("accountName :" + accountName); - - if (orgProxy.CreateSecurityGroup(org.OrganizationId, accountName, displayName, managedBy) == 0) + if (orgProxy.CreateSecurityGroup(org.OrganizationId, displayName, managedBy) == 0) { - OrganizationSecurityGroup retSecurityGroup = orgProxy.GetSecurityGroupGeneralSettings(accountName, org.OrganizationId); - TaskManager.Write("sAMAccountName :" + retSecurityGroup.AccountName); + OrganizationSecurityGroup retSecurityGroup = orgProxy.GetSecurityGroupGeneralSettings(displayName, org.OrganizationId); + TaskManager.Write("sAMAccountName :" + retSecurityGroup.SAMAccountName); - securityGroupId = AddAccount(itemId, ExchangeAccountType.DistributionList, accountName, + securityGroupId = AddAccount(itemId, ExchangeAccountType.SecurityGroup, displayName, displayName, null, false, - 0, retSecurityGroup.AccountName, null, 0, null); + 0, retSecurityGroup.SAMAccountName, null, 0, null); } else { @@ -2337,6 +2285,67 @@ namespace WebsitePanel.EnterpriseServer return securityGroupId; } + private static OrganizationSecurityGroup GetDemoSecurityGroupGeneralSettings() + { + OrganizationSecurityGroup c = new OrganizationSecurityGroup(); + c.DisplayName = "Fabrikam Sales"; + c.AccountName = "sales_fabrikam"; + + return c; + } + + public static OrganizationSecurityGroup GetSecurityGroupGeneralSettings(int itemId, int accountId) + { + #region Demo Mode + if (IsDemoMode) + { + return GetDemoSecurityGroupGeneralSettings(); + } + #endregion + + // place log record + TaskManager.StartTask("ORGANIZATION", "GET_SECURITY_GROUP_GENERAL", itemId); + + try + { + // load organization + Organization org = GetOrganization(itemId); + if (org == null) + return null; + + OrganizationUser account = GetAccount(itemId, accountId); + + // get mailbox settings + Organizations orgProxy = GetOrganizationProxy(org.ServiceId); + + OrganizationSecurityGroup securityGroup = orgProxy.GetSecurityGroupGeneralSettings(account.AccountName, org.OrganizationId); + + securityGroup.DisplayName = account.DisplayName; + + securityGroup.IsDefault = account.AccountType == ExchangeAccountType.DefaultSecurityGroup; + + foreach (OrganizationUser user in securityGroup.MembersAccounts) + { + OrganizationUser userAccount = GetAccountByAccountName(itemId, user.SamAccountName); + + user.AccountId = userAccount.AccountId; + user.AccountName = userAccount.AccountName; + user.PrimaryEmailAddress = userAccount.PrimaryEmailAddress; + user.AccountType = userAccount.AccountType; + } + + return securityGroup; + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + } + public static int DeleteSecurityGroup(int itemId, int accountId) { // check account @@ -2407,7 +2416,6 @@ namespace WebsitePanel.EnterpriseServer orgProxy.SetSecurityGroupGeneralSettings( org.OrganizationId, accountName, - displayName, managedBy, memberAccounts, notes); @@ -2461,8 +2469,7 @@ namespace WebsitePanel.EnterpriseServer } #endregion - string accountTypes = string.Format("{0}", ((int)ExchangeAccountType.SecurityGroup)); - + string accountTypes = string.Format("{0}, {1}", ((int)ExchangeAccountType.SecurityGroup), ((int)ExchangeAccountType.DefaultSecurityGroup)); DataSet ds = DataProvider.GetExchangeAccountsPaged(SecurityContext.User.UserId, itemId, accountTypes, filterColumn, @@ -2489,6 +2496,44 @@ namespace WebsitePanel.EnterpriseServer return result; } + + public static int AddUserToSecurityGroup(int itemId, int userAccountId, int groupAccountId) + { + // check account + int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); + if (accountCheck < 0) return accountCheck; + + // place log record + TaskManager.StartTask("ORGANIZATION", "ADD_USER_TO_SECURITY_GROUP", itemId); + + try + { + // load organization + Organization org = GetOrganization(itemId); + if (org == null) + return -1; + + // load user account + OrganizationUser userAccount = GetAccount(itemId, userAccountId); + + //load group account + ExchangeAccount groupAccount = ExchangeServerController.GetAccount(itemId, groupAccountId); + + Organizations orgProxy = GetOrganizationProxy(org.ServiceId); + + orgProxy.AddUserToSecurityGroup(org.OrganizationId, userAccount.AccountName, groupAccount.AccountName); + + return 0; + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + } } } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esOrganizations.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esOrganizations.asmx.cs index 5f327c11..6d632462 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esOrganizations.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esOrganizations.asmx.cs @@ -275,6 +275,12 @@ namespace WebsitePanel.EnterpriseServer return OrganizationController.GetOrganizationSecurityGroupsPaged(itemId, filterColumn, filterValue, sortColumn, startRow, maximumRows); } + [WebMethod] + public int AddUserToSecurityGroup(int itemId, int userAccountId, int groupAccountId) + { + return OrganizationController.AddUserToSecurityGroup(itemId, userAccountId, groupAccountId); + } + #endregion } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ADAttributes.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ADAttributes.cs index 9ef289cb..c53441a1 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ADAttributes.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ADAttributes.cs @@ -61,6 +61,7 @@ namespace WebsitePanel.Providers.HostedSolution public const string ExternalEmail = "mail"; public const string CustomAttribute2 = "extensionAttribute2"; public const string DistinguishedName = "distinguishedName"; + public const string ManagedBy = "ManagedBy"; } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ActiveDirectoryUtils.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ActiveDirectoryUtils.cs index 3ec258f4..773afad4 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ActiveDirectoryUtils.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ActiveDirectoryUtils.cs @@ -349,11 +349,6 @@ namespace WebsitePanel.Providers.HostedSolution } public static void CreateGroup(string path, string group) - { - CreateGroup(path, group, ""); - } - - public static void CreateGroup(string path, string group, string manager) { DirectoryEntry currentADObject = new DirectoryEntry(path); @@ -363,11 +358,6 @@ namespace WebsitePanel.Providers.HostedSolution newGroupObject.Properties[ADAttributes.GroupType].Add(-2147483640); - if (!string.IsNullOrEmpty(manager)) - { - newGroupObject.Properties[ADAttributes.Manager].Add(manager); - } - newGroupObject.CommitChanges(); } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeAccountType.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeAccountType.cs index defa7899..c8e3c3da 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeAccountType.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeAccountType.cs @@ -38,7 +38,8 @@ namespace WebsitePanel.Providers.HostedSolution Room = 5, Equipment = 6, User = 7, - SecurityGroup = 8 + SecurityGroup = 8, + DefaultSecurityGroup = 9 } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/IOrganization.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/IOrganization.cs index 1c1f5971..bda213b7 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/IOrganization.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/IOrganization.cs @@ -42,13 +42,15 @@ namespace WebsitePanel.Providers.HostedSolution OrganizationUser GetUserGeneralSettings(string loginName, string organizationId); - int CreateSecurityGroup(string organizationId, string groupName, string displayName, string managedBy); + int CreateSecurityGroup(string organizationId, string groupName, string managedBy); OrganizationSecurityGroup GetSecurityGroupGeneralSettings(string groupName, string organizationId); void DeleteSecurityGroup(string groupName, string organizationId); - void SetSecurityGroupGeneralSettings(string organizationId, string groupName, string displayName, string managedBy, string[] memberAccounts, string notes); + void SetSecurityGroupGeneralSettings(string organizationId, string groupName, string managedBy, string[] memberAccounts, string notes); + + void AddUserToSecurityGroup(string organizationId, string loginName, string groupName); void SetUserGeneralSettings(string organizationId, string accountName, string displayName, string password, bool hideFromAddressBook, bool disabled, bool locked, string firstName, string initials, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationSecurityGroup.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationSecurityGroup.cs index 5e52f13f..52afb68c 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationSecurityGroup.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationSecurityGroup.cs @@ -42,5 +42,11 @@ namespace WebsitePanel.Providers.HostedSolution get; set; } + + public bool IsDefault + { + get; + set; + } } } \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/OrganizationProvider.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/OrganizationProvider.cs index 5b641448..f1cab4d2 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/OrganizationProvider.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/OrganizationProvider.cs @@ -227,6 +227,7 @@ namespace WebsitePanel.Providers.HostedSolution org.OrganizationId = organizationId; org.DistinguishedName = ActiveDirectoryUtils.RemoveADPrefix(orgPath); org.SecurityGroup = ActiveDirectoryUtils.RemoveADPrefix(GetGroupPath(organizationId)); + org.GroupName = organizationId; } catch (Exception ex) { @@ -547,7 +548,7 @@ namespace WebsitePanel.Providers.HostedSolution retUser.Notes = ActiveDirectoryUtils.GetADObjectStringProperty(entry, ADAttributes.Notes); retUser.ExternalEmail = ActiveDirectoryUtils.GetADObjectStringProperty(entry, ADAttributes.ExternalEmail); retUser.Disabled = (bool)entry.InvokeGet(ADAttributes.AccountDisabled); - retUser.Manager = GetManager(entry); + retUser.Manager = GetManager(entry, ADAttributes.Manager); retUser.SamAccountName = ActiveDirectoryUtils.GetADObjectStringProperty(entry, ADAttributes.SAMAccountName); retUser.DomainUserName = GetDomainName(ActiveDirectoryUtils.GetADObjectStringProperty(entry, ADAttributes.SAMAccountName)); retUser.DistinguishedName = ActiveDirectoryUtils.GetADObjectStringProperty(entry, ADAttributes.DistinguishedName); @@ -564,10 +565,10 @@ namespace WebsitePanel.Providers.HostedSolution return ret; } - private OrganizationUser GetManager(DirectoryEntry entry) + private OrganizationUser GetManager(DirectoryEntry entry, string adAttribute) { OrganizationUser retUser = null; - string path = ActiveDirectoryUtils.GetADObjectStringProperty(entry, ADAttributes.Manager); + string path = ActiveDirectoryUtils.GetADObjectStringProperty(entry, adAttribute); if (!string.IsNullOrEmpty(path)) { path = ActiveDirectoryUtils.AddADPrefix(path, PrimaryDomainController); @@ -824,12 +825,12 @@ namespace WebsitePanel.Providers.HostedSolution #region Security Groups - public int CreateSecurityGroup(string organizationId, string groupName, string displayName, string managedBy) + public int CreateSecurityGroup(string organizationId, string groupName, string managedBy) { - return CreateSecurityGroupInternal(organizationId, groupName, displayName, managedBy); + return CreateSecurityGroupInternal(organizationId, groupName, managedBy); } - internal int CreateSecurityGroupInternal(string organizationId, string groupName, string displayName, string managedBy) + internal int CreateSecurityGroupInternal(string organizationId, string groupName, string managedBy) { HostedSolutionLog.LogStart("CreateSecurityGroupInternal"); HostedSolutionLog.DebugInfo("organizationId : {0}", organizationId); @@ -850,6 +851,10 @@ namespace WebsitePanel.Providers.HostedSolution if (!ActiveDirectoryUtils.AdObjectExists(groupPath)) { + ActiveDirectoryUtils.CreateGroup(path, groupName); + + DirectoryEntry entry = ActiveDirectoryUtils.GetADObject(groupPath); + string manager = string.Empty; if (!string.IsNullOrEmpty(managedBy)) { @@ -857,7 +862,9 @@ namespace WebsitePanel.Providers.HostedSolution manager = ActiveDirectoryUtils.AdObjectExists(managerPath) ? managerPath : string.Empty; } - ActiveDirectoryUtils.CreateGroup(path, groupName, ActiveDirectoryUtils.RemoveADPrefix(manager)); + ActiveDirectoryUtils.SetADObjectProperty(entry, ADAttributes.ManagedBy, ActiveDirectoryUtils.RemoveADPrefix(manager)); + + entry.CommitChanges(); groupCreated = true; @@ -915,9 +922,11 @@ namespace WebsitePanel.Providers.HostedSolution OrganizationSecurityGroup securityGroup = new OrganizationSecurityGroup(); - securityGroup.DisplayName = ActiveDirectoryUtils.GetADObjectStringProperty(entry, ADAttributes.DisplayName); - securityGroup.ManagerAccount = GetManager(entry); + securityGroup.ManagerAccount = GetManager(entry, ADAttributes.ManagedBy); + securityGroup.Notes = ActiveDirectoryUtils.GetADObjectStringProperty(entry, ADAttributes.Notes); + + securityGroup.AccountName = ActiveDirectoryUtils.GetADObjectStringProperty(entry, ADAttributes.SAMAccountName); securityGroup.SAMAccountName = ActiveDirectoryUtils.GetADObjectStringProperty(entry, ADAttributes.SAMAccountName); List members = new List(); @@ -959,13 +968,13 @@ namespace WebsitePanel.Providers.HostedSolution HostedSolutionLog.LogEnd("DeleteSecurityGroupInternal"); } - public void SetSecurityGroupGeneralSettings(string organizationId, string groupName, string displayName, string managedBy, string[] memberAccounts, string notes) + public void SetSecurityGroupGeneralSettings(string organizationId, string groupName, string managedBy, string[] memberAccounts, string notes) { - SetSecurityGroupGeneralSettingsInternal(organizationId, groupName, displayName, managedBy, memberAccounts, notes); + SetSecurityGroupGeneralSettingsInternal(organizationId, groupName, managedBy, memberAccounts, notes); } - internal void SetSecurityGroupGeneralSettingsInternal(string organizationId, string groupName, string displayName, string managedBy, string[] memberAccounts, string notes) + internal void SetSecurityGroupGeneralSettingsInternal(string organizationId, string groupName, string managedBy, string[] memberAccounts, string notes) { HostedSolutionLog.LogStart("SetSecurityGroupGeneralSettingsInternal"); HostedSolutionLog.DebugInfo("organizationId : {0}", organizationId); @@ -981,8 +990,6 @@ namespace WebsitePanel.Providers.HostedSolution DirectoryEntry entry = ActiveDirectoryUtils.GetADObject(path); - ActiveDirectoryUtils.SetADObjectProperty(entry, ADAttributes.DisplayName, displayName); - string manager = string.Empty; if (!string.IsNullOrEmpty(managedBy)) { @@ -990,7 +997,7 @@ namespace WebsitePanel.Providers.HostedSolution manager = ActiveDirectoryUtils.AdObjectExists(managerPath) ? managerPath : string.Empty; } - ActiveDirectoryUtils.SetADObjectProperty(entry, ADAttributes.Manager, ActiveDirectoryUtils.RemoveADPrefix(manager)); + ActiveDirectoryUtils.SetADObjectProperty(entry, ADAttributes.ManagedBy, ActiveDirectoryUtils.RemoveADPrefix(manager)); ActiveDirectoryUtils.SetADObjectProperty(entry, ADAttributes.Notes, notes); @@ -1006,6 +1013,34 @@ namespace WebsitePanel.Providers.HostedSolution entry.CommitChanges(); } + public void AddUserToSecurityGroup(string organizationId, string loginName, string groupName) + { + AddUserToSecurityGroupInternal(organizationId, loginName, groupName); + } + + internal void AddUserToSecurityGroupInternal(string organizationId, string loginName, string groupName) + { + HostedSolutionLog.LogStart("AddUserToSecurityGroupInternal"); + HostedSolutionLog.DebugInfo("organizationId : {0}", organizationId); + HostedSolutionLog.DebugInfo("loginName : {0}", loginName); + HostedSolutionLog.DebugInfo("groupName : {0}", groupName); + + if (string.IsNullOrEmpty(organizationId)) + throw new ArgumentNullException("organizationId"); + + if (string.IsNullOrEmpty(loginName)) + throw new ArgumentNullException("loginName"); + + if (string.IsNullOrEmpty(groupName)) + throw new ArgumentNullException("groupName"); + + string userPath = GetUserPath(organizationId, loginName); + + string groupPath = GetGroupPath(organizationId, groupName); + + ActiveDirectoryUtils.AddUserToGroup(userPath, groupPath); + } + #endregion public override bool IsInstalled() diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Client/OrganizationProxy.cs b/WebsitePanel/Sources/WebsitePanel.Server.Client/OrganizationProxy.cs index 879ef85c..b01c7dc4 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Client/OrganizationProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Client/OrganizationProxy.cs @@ -85,6 +85,8 @@ namespace WebsitePanel.Providers.HostedSolution private System.Threading.SendOrPostCallback SetSecurityGroupGeneralSettingsOperationCompleted; + private System.Threading.SendOrPostCallback AddUserToSecurityGroupOperationCompleted; + private System.Threading.SendOrPostCallback SetUserGeneralSettingsOperationCompleted; private System.Threading.SendOrPostCallback SetUserPasswordOperationCompleted; @@ -137,6 +139,9 @@ namespace WebsitePanel.Providers.HostedSolution /// public event SetSecurityGroupGeneralSettingsCompletedEventHandler SetSecurityGroupGeneralSettingsCompleted; + /// + public event AddUserToSecurityGroupCompletedEventHandler AddUserToSecurityGroupCompleted; + /// public event SetUserGeneralSettingsCompletedEventHandler SetUserGeneralSettingsCompleted; @@ -481,23 +486,21 @@ namespace WebsitePanel.Providers.HostedSolution /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/CreateSecurityGroup", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int CreateSecurityGroup(string organizationId, string groupName, string displayName, string managedBy) + public int CreateSecurityGroup(string organizationId, string groupName, string managedBy) { object[] results = this.Invoke("CreateSecurityGroup", new object[] { organizationId, groupName, - displayName, managedBy}); return ((int)(results[0])); } /// - public System.IAsyncResult BeginCreateSecurityGroup(string organizationId, string groupName, string displayName, string managedBy, System.AsyncCallback callback, object asyncState) + public System.IAsyncResult BeginCreateSecurityGroup(string organizationId, string groupName, string managedBy, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("CreateSecurityGroup", new object[] { organizationId, groupName, - displayName, managedBy}, callback, asyncState); } @@ -509,13 +512,13 @@ namespace WebsitePanel.Providers.HostedSolution } /// - public void CreateSecurityGroupAsync(string organizationId, string groupName, string displayName, string managedBy) + public void CreateSecurityGroupAsync(string organizationId, string groupName, string managedBy) { - this.CreateSecurityGroupAsync(organizationId, groupName, displayName, managedBy, null); + this.CreateSecurityGroupAsync(organizationId, groupName, managedBy, null); } /// - public void CreateSecurityGroupAsync(string organizationId, string groupName, string displayName, string managedBy, object userState) + public void CreateSecurityGroupAsync(string organizationId, string groupName, string managedBy, object userState) { if ((this.CreateSecurityGroupOperationCompleted == null)) { @@ -524,7 +527,6 @@ namespace WebsitePanel.Providers.HostedSolution this.InvokeAsync("CreateSecurityGroup", new object[] { organizationId, groupName, - displayName, managedBy}, this.CreateSecurityGroupOperationCompleted, userState); } @@ -644,24 +646,22 @@ namespace WebsitePanel.Providers.HostedSolution /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SetSecurityGroupGeneralSettings", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void SetSecurityGroupGeneralSettings(string organizationId, string groupName, string displayName, string managedBy, string[] memberAccounts, string notes) + public void SetSecurityGroupGeneralSettings(string organizationId, string groupName, string managedBy, string[] memberAccounts, string notes) { this.Invoke("SetSecurityGroupGeneralSettings", new object[] { organizationId, groupName, - displayName, managedBy, memberAccounts, notes}); } /// - public System.IAsyncResult BeginSetSecurityGroupGeneralSettings(string organizationId, string groupName, string displayName, string managedBy, string[] memberAccounts, string notes, System.AsyncCallback callback, object asyncState) + public System.IAsyncResult BeginSetSecurityGroupGeneralSettings(string organizationId, string groupName, string managedBy, string[] memberAccounts, string notes, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("SetSecurityGroupGeneralSettings", new object[] { organizationId, groupName, - displayName, managedBy, memberAccounts, notes}, callback, asyncState); @@ -674,13 +674,13 @@ namespace WebsitePanel.Providers.HostedSolution } /// - public void SetSecurityGroupGeneralSettingsAsync(string organizationId, string groupName, string displayName, string managedBy, string[] memberAccounts, string notes) + public void SetSecurityGroupGeneralSettingsAsync(string organizationId, string groupName, string managedBy, string[] memberAccounts, string notes) { - this.SetSecurityGroupGeneralSettingsAsync(organizationId, groupName, displayName, managedBy, memberAccounts, notes, null); + this.SetSecurityGroupGeneralSettingsAsync(organizationId, groupName, managedBy, memberAccounts, notes, null); } /// - public void SetSecurityGroupGeneralSettingsAsync(string organizationId, string groupName, string displayName, string managedBy, string[] memberAccounts, string notes, object userState) + public void SetSecurityGroupGeneralSettingsAsync(string organizationId, string groupName, string managedBy, string[] memberAccounts, string notes, object userState) { if ((this.SetSecurityGroupGeneralSettingsOperationCompleted == null)) { @@ -689,7 +689,6 @@ namespace WebsitePanel.Providers.HostedSolution this.InvokeAsync("SetSecurityGroupGeneralSettings", new object[] { organizationId, groupName, - displayName, managedBy, memberAccounts, notes}, this.SetSecurityGroupGeneralSettingsOperationCompleted, userState); @@ -704,6 +703,60 @@ namespace WebsitePanel.Providers.HostedSolution } } + /// + [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) + { + this.Invoke("AddUserToSecurityGroup", new object[] { + organizationId, + loginName, + groupName}); + } + + /// + public System.IAsyncResult BeginAddUserToSecurityGroup(string organizationId, string loginName, string groupName, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("AddUserToSecurityGroup", new object[] { + organizationId, + loginName, + groupName}, callback, asyncState); + } + + /// + public void EndAddUserToSecurityGroup(System.IAsyncResult asyncResult) + { + this.EndInvoke(asyncResult); + } + + /// + public void AddUserToSecurityGroupAsync(string organizationId, string loginName, string groupName) + { + this.AddUserToSecurityGroupAsync(organizationId, loginName, groupName, null); + } + + /// + public void AddUserToSecurityGroupAsync(string organizationId, string loginName, string groupName, object userState) + { + if ((this.AddUserToSecurityGroupOperationCompleted == null)) + { + this.AddUserToSecurityGroupOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddUserToSecurityGroupOperationCompleted); + } + this.InvokeAsync("AddUserToSecurityGroup", new object[] { + organizationId, + loginName, + groupName}, this.AddUserToSecurityGroupOperationCompleted, userState); + } + + private void OnAddUserToSecurityGroupOperationCompleted(object arg) + { + if ((this.AddUserToSecurityGroupCompleted != 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)); + } + } + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SetUserGeneralSettings", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] @@ -1511,6 +1564,10 @@ namespace WebsitePanel.Providers.HostedSolution [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void SetSecurityGroupGeneralSettingsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + public delegate void AddUserToSecurityGroupCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void SetUserGeneralSettingsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); diff --git a/WebsitePanel/Sources/WebsitePanel.Server/Organizations.asmx.cs b/WebsitePanel/Sources/WebsitePanel.Server/Organizations.asmx.cs index 27e50128..dd7f3504 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server/Organizations.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server/Organizations.asmx.cs @@ -111,9 +111,9 @@ namespace WebsitePanel.Server } [WebMethod, SoapHeader("settings")] - public int CreateSecurityGroup(string organizationId, string groupName, string displayName, string managedBy) + public int CreateSecurityGroup(string organizationId, string groupName, string managedBy) { - return Organization.CreateSecurityGroup(organizationId, groupName, displayName, managedBy); + return Organization.CreateSecurityGroup(organizationId, groupName, managedBy); } [WebMethod, SoapHeader("settings")] @@ -129,9 +129,15 @@ namespace WebsitePanel.Server } [WebMethod, SoapHeader("settings")] - public void SetSecurityGroupGeneralSettings(string organizationId, string groupName, string displayName, string managedBy, string[] memberAccounts, string notes) + public void SetSecurityGroupGeneralSettings(string organizationId, string groupName, string managedBy, string[] memberAccounts, string notes) { - Organization.SetSecurityGroupGeneralSettings(organizationId, groupName, displayName, managedBy, memberAccounts, notes); + Organization.SetSecurityGroupGeneralSettings(organizationId, groupName, managedBy, memberAccounts, notes); + } + + [WebMethod, SoapHeader("settings")] + public void AddUserToSecurityGroup(string organizationId, string loginName, string groupName) + { + Organization.AddUserToSecurityGroup(organizationId, loginName, groupName); } [WebMethod, SoapHeader("settings")] diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationSecurityGroups.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationSecurityGroups.ascx.resx index ca580087..62ee62f5 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationSecurityGroups.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationSecurityGroups.ascx.resx @@ -135,9 +135,6 @@ Display Name - - E-mail Address - diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationSecurityGroupGeneralSettings.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationSecurityGroupGeneralSettings.ascx index 884eeded..f6453c2c 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationSecurityGroupGeneralSettings.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationSecurityGroupGeneralSettings.ascx @@ -1,6 +1,5 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="OrganizationSecurityGroupGeneralSettings.ascx.cs" Inherits="WebsitePanel.Portal.ExchangeServer.OrganizationSecurityGroupGeneralSettings" %> <%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %> -<%--<%@ Register Src="UserControls/AccountsList.ascx" TagName="AccountsList" TagPrefix="wsp" %>--%> <%@ Register Src="UserControls/UsersList.ascx" TagName="UsersList" TagPrefix="wsp"%> <%@ Register Src="UserControls/UserSelector.ascx" TagName="UserSelector" TagPrefix="wsp" %> <%@ Register Src="UserControls/SecurityGroupTabs.ascx" TagName="SecurityGroupTabs" TagPrefix="wsp"%> @@ -17,13 +16,13 @@
- +
- +
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationSecurityGroupGeneralSettings.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationSecurityGroupGeneralSettings.ascx.cs index 7f3e9074..d8f71bf4 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationSecurityGroupGeneralSettings.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationSecurityGroupGeneralSettings.ascx.cs @@ -70,10 +70,18 @@ namespace WebsitePanel.Portal.ExchangeServer members.SetAccounts(securityGroup.MembersAccounts); txtNotes.Text = securityGroup.Notes; + + if (securityGroup.IsDefault) + { + txtDisplayName.ReadOnly = true; + txtNotes.ReadOnly = true; + manager.Enabled = false; + members.Enabled = false; + } } catch (Exception ex) { - messageBox.ShowErrorMessage("EXCHANGE_GET_DLIST_SETTINGS", ex); + messageBox.ShowErrorMessage("ORGANIZATION_GET_SECURITY_GROUP_SETTINGS", ex); } } @@ -84,15 +92,12 @@ namespace WebsitePanel.Portal.ExchangeServer try { - int result = ES.Services.ExchangeServer.SetDistributionListGeneralSettings( - PanelRequest.ItemID, PanelRequest.AccountID, + int result = ES.Services.Organizations.SetSecurityGroupGeneralSettings( + PanelRequest.ItemID, + PanelRequest.AccountID, txtDisplayName.Text, - false, - manager.GetAccount(), - members.GetAccounts(), - txtNotes.Text); if (result < 0) @@ -103,11 +108,11 @@ namespace WebsitePanel.Portal.ExchangeServer litDisplayName.Text = PortalAntiXSS.Encode(txtDisplayName.Text); - messageBox.ShowSuccessMessage("EXCHANGE_UPDATE_DLIST_SETTINGS"); + messageBox.ShowSuccessMessage("ORGANIZATION_UPDATE_SECURITY_GROUP_SETTINGS"); } catch (Exception ex) { - messageBox.ShowErrorMessage("EXCHANGE_UPDATE_DLIST_SETTINGS", ex); + messageBox.ShowErrorMessage("ORGANIZATION_UPDATE_SECURITY_GROUP_SETTINGS", ex); } } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationSecurityGroups.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationSecurityGroups.ascx index 938152b0..14eabbc4 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationSecurityGroups.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationSecurityGroups.ascx @@ -2,7 +2,6 @@ <%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %> <%@ Register Src="UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %> <%@ Register Src="UserControls/Breadcrumb.ascx" TagName="Breadcrumb" TagPrefix="wsp" %> -<%@ Register Src="../UserControls/QuotaViewer.ascx" TagName="QuotaViewer" TagPrefix="wsp" %> <%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %> @@ -13,13 +12,13 @@
- +
- +
@@ -42,7 +41,6 @@ DisplayName - Email @@ -51,7 +49,7 @@ @@ -66,7 +64,7 @@ @@ -80,7 +78,7 @@ OnSelected="odsSecurityGroupsPaged_Selected"> - + diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationSecurityGroups.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationSecurityGroups.ascx.cs index 8678f6f2..6719af20 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationSecurityGroups.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationSecurityGroups.ascx.cs @@ -46,14 +46,7 @@ namespace WebsitePanel.Portal.ExchangeServer { protected void Page_Load(object sender, EventArgs e) { - if (!IsPostBack) - { - BindStats(); - } - } - private void BindStats() - { } protected void btnCreateGroup_Click(object sender, EventArgs e) @@ -69,6 +62,11 @@ namespace WebsitePanel.Portal.ExchangeServer "ItemID=" + PanelRequest.ItemID.ToString()); } + public bool IsNotDefault(string accountType) + { + return (ExchangeAccountType)Enum.Parse(typeof(ExchangeAccountType), accountType) != ExchangeAccountType.DefaultSecurityGroup; + } + protected void odsSecurityGroupsPaged_Selected(object sender, ObjectDataSourceStatusEventArgs e) { if (e.Exception != null) @@ -78,7 +76,7 @@ namespace WebsitePanel.Portal.ExchangeServer } } - protected void gvLists_RowCommand(object sender, GridViewCommandEventArgs e) + protected void gvSecurityGroups_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "DeleteItem") { @@ -96,8 +94,6 @@ namespace WebsitePanel.Portal.ExchangeServer // rebind grid gvGroups.DataBind(); - - BindStats(); } catch (Exception ex) { @@ -112,10 +108,7 @@ namespace WebsitePanel.Portal.ExchangeServer // rebind grid gvGroups.DataBind(); - - // bind stats - BindStats(); - + } } } \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserMemberOf.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserMemberOf.ascx index b2479926..2d2936f3 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserMemberOf.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserMemberOf.ascx @@ -10,6 +10,7 @@ <%@ Register Src="UserControls/Breadcrumb.ascx" TagName="Breadcrumb" TagPrefix="wsp" %> <%@ Register Src="UserControls/EmailAddress.ascx" TagName="EmailAddress" TagPrefix="wsp" %> <%@ Register Src="UserControls/AccountsList.ascx" TagName="AccountsList" TagPrefix="wsp" %> +<%@ Register Src="UserControls/UsersList.ascx" TagName="UsersList" TagPrefix="wsp" %> @@ -42,9 +43,9 @@ - - - + + + + + + + + + + + + +
- /// DistributionLists control. + /// DistributionListsPanel control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Panel DistributionLists; + protected global::System.Web.UI.WebControls.Panel DistributionListsPanel; /// - /// GeneralUpdatePanel control. + /// DLGeneralUpdatePanel control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.UpdatePanel GeneralUpdatePanel; + protected global::System.Web.UI.UpdatePanel DLGeneralUpdatePanel; /// /// distrlists control. @@ -129,6 +129,42 @@ namespace WebsitePanel.Portal.HostedSolution { /// protected global::WebsitePanel.Portal.ExchangeServer.UserControls.AccountsList distrlists; + /// + /// secSecurityGroups control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.CollapsiblePanel secSecurityGroups; + + /// + /// SecurityGroupsPanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel SecurityGroupsPanel; + + /// + /// SCGeneralUpdatePanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.UpdatePanel SCGeneralUpdatePanel; + + /// + /// securegroups control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.ExchangeServer.UserControls.AccountsList securegroups; + /// /// btnSave control. /// diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/UserSelector.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/UserSelector.ascx index a5c22ab2..5912e0e5 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/UserSelector.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/UserSelector.ascx @@ -4,8 +4,10 @@ +<% if (Enabled) { %> +<% } %>