Remove "managedBy" functionality for security groups and fix bug with

organization naming when create organization user (when Append Org ID)
This commit is contained in:
vfedosevich 2013-08-26 14:33:09 +03:00
parent f7fae8fe2f
commit 3fc3a425e0
19 changed files with 52 additions and 206 deletions

View file

@ -1886,22 +1886,20 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution
/// <remarks/>
[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(int itemId, string displayName, string managedBy)
public int CreateSecurityGroup(int itemId, string displayName)
{
object[] results = this.Invoke("CreateSecurityGroup", new object[] {
itemId,
displayName,
managedBy});
displayName});
return ((int)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginCreateSecurityGroup(int itemId, string displayName, string managedBy, System.AsyncCallback callback, object asyncState)
public System.IAsyncResult BeginCreateSecurityGroup(int itemId, string displayName, System.AsyncCallback callback, object asyncState)
{
return this.BeginInvoke("CreateSecurityGroup", new object[] {
itemId,
displayName,
managedBy}, callback, asyncState);
displayName}, callback, asyncState);
}
/// <remarks/>
@ -1912,13 +1910,13 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution
}
/// <remarks/>
public void CreateSecurityGroupAsync(int itemId, string displayName, string managedBy)
public void CreateSecurityGroupAsync(int itemId, string displayName)
{
this.CreateSecurityGroupAsync(itemId, displayName, managedBy, null);
this.CreateSecurityGroupAsync(itemId, displayName, null);
}
/// <remarks/>
public void CreateSecurityGroupAsync(int itemId, string displayName, string managedBy, object userState)
public void CreateSecurityGroupAsync(int itemId, string displayName, object userState)
{
if ((this.CreateSecurityGroupOperationCompleted == null))
{
@ -1926,8 +1924,7 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution
}
this.InvokeAsync("CreateSecurityGroup", new object[] {
itemId,
displayName,
managedBy}, this.CreateSecurityGroupOperationCompleted, userState);
displayName}, this.CreateSecurityGroupOperationCompleted, userState);
}
private void OnCreateSecurityGroupOperationCompleted(object arg)
@ -2045,26 +2042,24 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution
/// <remarks/>
[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 int SetSecurityGroupGeneralSettings(int itemId, int accountId, string displayName, string managedBy, string[] memberAccounts, string notes)
public int SetSecurityGroupGeneralSettings(int itemId, int accountId, string displayName, string[] memberAccounts, string notes)
{
object[] results = this.Invoke("SetSecurityGroupGeneralSettings", new object[] {
itemId,
accountId,
displayName,
managedBy,
memberAccounts,
notes});
return ((int)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginSetSecurityGroupGeneralSettings(int itemId, int accountId, string displayName, string managedBy, string[] memberAccounts, string notes, System.AsyncCallback callback, object asyncState)
public System.IAsyncResult BeginSetSecurityGroupGeneralSettings(int itemId, int accountId, string displayName, string[] memberAccounts, string notes, System.AsyncCallback callback, object asyncState)
{
return this.BeginInvoke("SetSecurityGroupGeneralSettings", new object[] {
itemId,
accountId,
displayName,
managedBy,
memberAccounts,
notes}, callback, asyncState);
}
@ -2077,13 +2072,13 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution
}
/// <remarks/>
public void SetSecurityGroupGeneralSettingsAsync(int itemId, int accountId, string displayName, string managedBy, string[] memberAccounts, string notes)
public void SetSecurityGroupGeneralSettingsAsync(int itemId, int accountId, string displayName, string[] memberAccounts, string notes)
{
this.SetSecurityGroupGeneralSettingsAsync(itemId, accountId, displayName, managedBy, memberAccounts, notes, null);
this.SetSecurityGroupGeneralSettingsAsync(itemId, accountId, displayName, memberAccounts, notes, null);
}
/// <remarks/>
public void SetSecurityGroupGeneralSettingsAsync(int itemId, int accountId, string displayName, string managedBy, string[] memberAccounts, string notes, object userState)
public void SetSecurityGroupGeneralSettingsAsync(int itemId, int accountId, string displayName, string[] memberAccounts, string notes, object userState)
{
if ((this.SetSecurityGroupGeneralSettingsOperationCompleted == null))
{
@ -2093,7 +2088,6 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution
itemId,
accountId,
displayName,
managedBy,
memberAccounts,
notes}, this.SetSecurityGroupGeneralSettingsOperationCompleted, userState);
}

View file

@ -1509,6 +1509,10 @@ namespace WebsitePanel.EnterpriseServer
/// <returns> The account name with organization Id. </returns>
private static string BuildAccountNameWithOrgId(string orgId, string name, int serviceId)
{
name = name.Length > 5 ? name.Substring(0, 5) : name;
orgId = (orgId.Length + name.Length) > 19 ? orgId.Substring(0, 19 - name.Length) : orgId;
int maxLen = 19 - orgId.Length;
// try to choose name
@ -1536,6 +1540,7 @@ namespace WebsitePanel.EnterpriseServer
}
}
private static string genSamLogin(string login, string strCounter)
{
int maxLogin = 20;
@ -2211,7 +2216,7 @@ namespace WebsitePanel.EnterpriseServer
mailboxManagerActions.ToString(), samAccountName, CryptoUtils.Encrypt(accountPassword), mailboxPlanId, (string.IsNullOrEmpty(subscriberNumber) ? null : subscriberNumber.Trim()));
}
public static int CreateSecurityGroup(int itemId, string displayName, string managedBy)
public static int CreateSecurityGroup(int itemId, string displayName)
{
if (string.IsNullOrEmpty(displayName))
throw new ArgumentNullException("displayName");
@ -2262,7 +2267,7 @@ namespace WebsitePanel.EnterpriseServer
TaskManager.Write("accountName :" + groupName);
if (orgProxy.CreateSecurityGroup(org.OrganizationId, groupName, managedBy) == 0)
if (orgProxy.CreateSecurityGroup(org.OrganizationId, groupName) == 0)
{
OrganizationSecurityGroup retSecurityGroup = orgProxy.GetSecurityGroupGeneralSettings(groupName, org.OrganizationId);
TaskManager.Write("sAMAccountName :" + retSecurityGroup.SAMAccountName);
@ -2395,7 +2400,7 @@ namespace WebsitePanel.EnterpriseServer
}
}
public static int SetSecurityGroupGeneralSettings(int itemId, int accountId, string displayName, string managedBy, string[] memberAccounts, string notes)
public static int SetSecurityGroupGeneralSettings(int itemId, int accountId, string displayName, string[] memberAccounts, string notes)
{
// check account
int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive);
@ -2428,7 +2433,6 @@ namespace WebsitePanel.EnterpriseServer
orgProxy.SetSecurityGroupGeneralSettings(
org.OrganizationId,
accountName,
managedBy,
memberAccounts,
notes);

View file

@ -245,9 +245,9 @@ namespace WebsitePanel.EnterpriseServer
#region Security Groups
[WebMethod]
public int CreateSecurityGroup(int itemId, string displayName, string managedBy)
public int CreateSecurityGroup(int itemId, string displayName)
{
return OrganizationController.CreateSecurityGroup(itemId, displayName, managedBy);
return OrganizationController.CreateSecurityGroup(itemId, displayName);
}
[WebMethod]
@ -263,9 +263,9 @@ namespace WebsitePanel.EnterpriseServer
}
[WebMethod]
public int SetSecurityGroupGeneralSettings(int itemId, int accountId, string displayName, string managedBy, string[] memberAccounts, string notes)
public int SetSecurityGroupGeneralSettings(int itemId, int accountId, string displayName, string[] memberAccounts, string notes)
{
return OrganizationController.SetSecurityGroupGeneralSettings(itemId, accountId, displayName, managedBy, memberAccounts, notes);
return OrganizationController.SetSecurityGroupGeneralSettings(itemId, accountId, displayName, memberAccounts, notes);
}
[WebMethod]

View file

@ -61,7 +61,6 @@ namespace WebsitePanel.Providers.HostedSolution
public const string ExternalEmail = "mail";
public const string CustomAttribute2 = "extensionAttribute2";
public const string DistinguishedName = "distinguishedName";
public const string ManagedBy = "ManagedBy";
}
}

View file

@ -42,13 +42,13 @@ namespace WebsitePanel.Providers.HostedSolution
OrganizationUser GetUserGeneralSettings(string loginName, string organizationId);
int CreateSecurityGroup(string organizationId, string groupName, string managedBy);
int CreateSecurityGroup(string organizationId, string groupName);
OrganizationSecurityGroup GetSecurityGroupGeneralSettings(string groupName, string organizationId);
void DeleteSecurityGroup(string groupName, string organizationId);
void SetSecurityGroupGeneralSettings(string organizationId, string groupName, string managedBy, string[] memberAccounts, string notes);
void SetSecurityGroupGeneralSettings(string organizationId, string groupName, string[] memberAccounts, string notes);
void AddUserToSecurityGroup(string organizationId, string loginName, string groupName);

View file

@ -25,12 +25,6 @@ namespace WebsitePanel.Providers.HostedSolution
set;
}
public OrganizationUser ManagerAccount
{
get;
set;
}
public string Notes
{
get;

View file

@ -825,12 +825,12 @@ namespace WebsitePanel.Providers.HostedSolution
#region Security Groups
public int CreateSecurityGroup(string organizationId, string groupName, string managedBy)
public int CreateSecurityGroup(string organizationId, string groupName)
{
return CreateSecurityGroupInternal(organizationId, groupName, managedBy);
return CreateSecurityGroupInternal(organizationId, groupName);
}
internal int CreateSecurityGroupInternal(string organizationId, string groupName, string managedBy)
internal int CreateSecurityGroupInternal(string organizationId, string groupName)
{
HostedSolutionLog.LogStart("CreateSecurityGroupInternal");
HostedSolutionLog.DebugInfo("organizationId : {0}", organizationId);
@ -853,19 +853,6 @@ namespace WebsitePanel.Providers.HostedSolution
{
ActiveDirectoryUtils.CreateGroup(path, groupName);
DirectoryEntry entry = ActiveDirectoryUtils.GetADObject(groupPath);
string manager = string.Empty;
if (!string.IsNullOrEmpty(managedBy))
{
string managerPath = GetUserPath(organizationId, managedBy);
manager = ActiveDirectoryUtils.AdObjectExists(managerPath) ? managerPath : string.Empty;
}
ActiveDirectoryUtils.SetADObjectProperty(entry, ADAttributes.ManagedBy, ActiveDirectoryUtils.RemoveADPrefix(manager));
entry.CommitChanges();
groupCreated = true;
HostedSolutionLog.DebugInfo("Security Group created: {0}", groupName);
@ -922,8 +909,6 @@ namespace WebsitePanel.Providers.HostedSolution
OrganizationSecurityGroup securityGroup = new OrganizationSecurityGroup();
securityGroup.ManagerAccount = GetManager(entry, ADAttributes.ManagedBy);
securityGroup.Notes = ActiveDirectoryUtils.GetADObjectStringProperty(entry, ADAttributes.Notes);
securityGroup.AccountName = ActiveDirectoryUtils.GetADObjectStringProperty(entry, ADAttributes.SAMAccountName);
@ -968,13 +953,13 @@ namespace WebsitePanel.Providers.HostedSolution
HostedSolutionLog.LogEnd("DeleteSecurityGroupInternal");
}
public void SetSecurityGroupGeneralSettings(string organizationId, string groupName, string managedBy, string[] memberAccounts, string notes)
public void SetSecurityGroupGeneralSettings(string organizationId, string groupName, string[] memberAccounts, string notes)
{
SetSecurityGroupGeneralSettingsInternal(organizationId, groupName, managedBy, memberAccounts, notes);
SetSecurityGroupGeneralSettingsInternal(organizationId, groupName, memberAccounts, notes);
}
internal void SetSecurityGroupGeneralSettingsInternal(string organizationId, string groupName, string managedBy, string[] memberAccounts, string notes)
internal void SetSecurityGroupGeneralSettingsInternal(string organizationId, string groupName, string[] memberAccounts, string notes)
{
HostedSolutionLog.LogStart("SetSecurityGroupGeneralSettingsInternal");
HostedSolutionLog.DebugInfo("organizationId : {0}", organizationId);
@ -990,15 +975,6 @@ namespace WebsitePanel.Providers.HostedSolution
DirectoryEntry entry = ActiveDirectoryUtils.GetADObject(path);
string manager = string.Empty;
if (!string.IsNullOrEmpty(managedBy))
{
string managerPath = GetUserPath(organizationId, managedBy);
manager = ActiveDirectoryUtils.AdObjectExists(managerPath) ? managerPath : string.Empty;
}
ActiveDirectoryUtils.SetADObjectProperty(entry, ADAttributes.ManagedBy, ActiveDirectoryUtils.RemoveADPrefix(manager));
ActiveDirectoryUtils.SetADObjectProperty(entry, ADAttributes.Notes, notes);
foreach(string userPath in ActiveDirectoryUtils.GetUsersGroup(groupName)) {

View file

@ -491,22 +491,20 @@ namespace WebsitePanel.Providers.HostedSolution
/// <remarks/>
[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 managedBy)
public int CreateSecurityGroup(string organizationId, string groupName)
{
object[] results = this.Invoke("CreateSecurityGroup", new object[] {
organizationId,
groupName,
managedBy});
groupName});
return ((int)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginCreateSecurityGroup(string organizationId, string groupName, string managedBy, System.AsyncCallback callback, object asyncState)
public System.IAsyncResult BeginCreateSecurityGroup(string organizationId, string groupName, System.AsyncCallback callback, object asyncState)
{
return this.BeginInvoke("CreateSecurityGroup", new object[] {
organizationId,
groupName,
managedBy}, callback, asyncState);
groupName}, callback, asyncState);
}
/// <remarks/>
@ -517,13 +515,13 @@ namespace WebsitePanel.Providers.HostedSolution
}
/// <remarks/>
public void CreateSecurityGroupAsync(string organizationId, string groupName, string managedBy)
public void CreateSecurityGroupAsync(string organizationId, string groupName)
{
this.CreateSecurityGroupAsync(organizationId, groupName, managedBy, null);
this.CreateSecurityGroupAsync(organizationId, groupName, null);
}
/// <remarks/>
public void CreateSecurityGroupAsync(string organizationId, string groupName, string managedBy, object userState)
public void CreateSecurityGroupAsync(string organizationId, string groupName, object userState)
{
if ((this.CreateSecurityGroupOperationCompleted == null))
{
@ -531,8 +529,7 @@ namespace WebsitePanel.Providers.HostedSolution
}
this.InvokeAsync("CreateSecurityGroup", new object[] {
organizationId,
groupName,
managedBy}, this.CreateSecurityGroupOperationCompleted, userState);
groupName}, this.CreateSecurityGroupOperationCompleted, userState);
}
private void OnCreateSecurityGroupOperationCompleted(object arg)
@ -651,23 +648,21 @@ namespace WebsitePanel.Providers.HostedSolution
/// <remarks/>
[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 managedBy, string[] memberAccounts, string notes)
public void SetSecurityGroupGeneralSettings(string organizationId, string groupName, string[] memberAccounts, string notes)
{
this.Invoke("SetSecurityGroupGeneralSettings", new object[] {
organizationId,
groupName,
managedBy,
memberAccounts,
notes});
}
/// <remarks/>
public System.IAsyncResult BeginSetSecurityGroupGeneralSettings(string organizationId, string groupName, string managedBy, string[] memberAccounts, string notes, System.AsyncCallback callback, object asyncState)
public System.IAsyncResult BeginSetSecurityGroupGeneralSettings(string organizationId, string groupName, string[] memberAccounts, string notes, System.AsyncCallback callback, object asyncState)
{
return this.BeginInvoke("SetSecurityGroupGeneralSettings", new object[] {
organizationId,
groupName,
managedBy,
memberAccounts,
notes}, callback, asyncState);
}
@ -679,13 +674,13 @@ namespace WebsitePanel.Providers.HostedSolution
}
/// <remarks/>
public void SetSecurityGroupGeneralSettingsAsync(string organizationId, string groupName, string managedBy, string[] memberAccounts, string notes)
public void SetSecurityGroupGeneralSettingsAsync(string organizationId, string groupName, string[] memberAccounts, string notes)
{
this.SetSecurityGroupGeneralSettingsAsync(organizationId, groupName, managedBy, memberAccounts, notes, null);
this.SetSecurityGroupGeneralSettingsAsync(organizationId, groupName, memberAccounts, notes, null);
}
/// <remarks/>
public void SetSecurityGroupGeneralSettingsAsync(string organizationId, string groupName, string managedBy, string[] memberAccounts, string notes, object userState)
public void SetSecurityGroupGeneralSettingsAsync(string organizationId, string groupName, string[] memberAccounts, string notes, object userState)
{
if ((this.SetSecurityGroupGeneralSettingsOperationCompleted == null))
{
@ -694,7 +689,6 @@ namespace WebsitePanel.Providers.HostedSolution
this.InvokeAsync("SetSecurityGroupGeneralSettings", new object[] {
organizationId,
groupName,
managedBy,
memberAccounts,
notes}, this.SetSecurityGroupGeneralSettingsOperationCompleted, userState);
}

View file

@ -111,9 +111,9 @@ namespace WebsitePanel.Server
}
[WebMethod, SoapHeader("settings")]
public int CreateSecurityGroup(string organizationId, string groupName, string managedBy)
public int CreateSecurityGroup(string organizationId, string groupName)
{
return Organization.CreateSecurityGroup(organizationId, groupName, managedBy);
return Organization.CreateSecurityGroup(organizationId, groupName);
}
[WebMethod, SoapHeader("settings")]
@ -129,9 +129,9 @@ namespace WebsitePanel.Server
}
[WebMethod, SoapHeader("settings")]
public void SetSecurityGroupGeneralSettings(string organizationId, string groupName, string managedBy, string[] memberAccounts, string notes)
public void SetSecurityGroupGeneralSettings(string organizationId, string groupName, string[] memberAccounts, string notes)
{
Organization.SetSecurityGroupGeneralSettings(organizationId, groupName, managedBy, memberAccounts, notes);
Organization.SetSecurityGroupGeneralSettings(organizationId, groupName, memberAccounts, notes);
}
[WebMethod, SoapHeader("settings")]

View file

@ -126,24 +126,15 @@
<data name="FormComments.Text" xml:space="preserve">
<value />
</data>
<data name="locAccount.Text" xml:space="preserve">
<value>E-mail Address: *</value>
</data>
<data name="locDisplayName.Text" xml:space="preserve">
<value>Display Name: *</value>
</data>
<data name="locManagedBy.Text" xml:space="preserve">
<value>Managed by: *</value>
</data>
<data name="locTitle.Text" xml:space="preserve">
<value>Create New Group</value>
</data>
<data name="Text.PageName" xml:space="preserve">
<value>Groups</value>
</data>
<data name="valManager.ErrorMessage" xml:space="preserve">
<value>Please specify a manager</value>
</data>
<data name="valRequireDisplayName.ErrorMessage" xml:space="preserve">
<value>Enter Display Name</value>
</data>

View file

@ -129,9 +129,6 @@
<data name="FormComments.Text" xml:space="preserve">
<value />
</data>
<data name="locManager.Text" xml:space="preserve">
<value>Managed By: *</value>
</data>
<data name="locMembers.Text" xml:space="preserve">
<value>Members:</value>
</data>
@ -144,9 +141,6 @@
<data name="Text.PageName" xml:space="preserve">
<value>Groups</value>
</data>
<data name="valManager.ErrorMessage" xml:space="preserve">
<value>Please specify a manager</value>
</data>
<data name="valRequireDisplayName.ErrorMessage" xml:space="preserve">
<value>Enter Display Name</value>
</data>

View file

@ -5,8 +5,6 @@
<%@ Register Src="UserControls/Breadcrumb.ascx" TagName="Breadcrumb" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
<%@ Register src="UserControls/UserSelector.ascx" tagname="UserSelector" tagprefix="wsp" %>
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
<div id="ExchangeContainer">
@ -32,15 +30,6 @@
<asp:TextBox ID="txtDisplayName" runat="server" CssClass="HugeTextBox200"></asp:TextBox>
<asp:RequiredFieldValidator ID="valRequireDisplayName" runat="server" meta:resourcekey="valRequireDisplayName" ControlToValidate="txtDisplayName"
ErrorMessage="Enter Display Name" ValidationGroup="CreateGroup" Display="Dynamic" Text="*" SetFocusOnError="True"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="FormLabel150"><asp:Localize ID="Localize1" runat="server" meta:resourcekey="locManagedBy" ></asp:Localize></td>
<td>
<wsp:userselector id="manager" IncludeMailboxes="true" runat="server" />
<asp:CustomValidator runat="server"
ValidationGroup="CreateGroup" meta:resourcekey="valManager" ID="valManager"
onservervalidate="valManager_ServerValidate" />
</td>
</tr>
</table>

View file

@ -57,7 +57,7 @@ namespace WebsitePanel.Portal.ExchangeServer
return;
try
{
int accountId = ES.Services.Organizations.CreateSecurityGroup(PanelRequest.ItemID, txtDisplayName.Text, manager.GetAccount());
int accountId = ES.Services.Organizations.CreateSecurityGroup(PanelRequest.ItemID, txtDisplayName.Text);
if (accountId < 0)
{
@ -74,10 +74,5 @@ namespace WebsitePanel.Portal.ExchangeServer
messageBox.ShowErrorMessage("ORGANIZATION_CREATE_SECURITY_GROUP", ex);
}
}
protected void valManager_ServerValidate(object source, ServerValidateEventArgs args)
{
args.IsValid = manager.GetAccountId() != 0;
}
}
}

View file

@ -93,33 +93,6 @@ namespace WebsitePanel.Portal.ExchangeServer {
/// </remarks>
protected global::System.Web.UI.WebControls.RequiredFieldValidator valRequireDisplayName;
/// <summary>
/// Localize1 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 Localize1;
/// <summary>
/// manager 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.UserSelector manager;
/// <summary>
/// valManager 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.CustomValidator valManager;
/// <summary>
/// btnCreate control.
/// </summary>

View file

@ -1,7 +1,6 @@
<%@ 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/UsersList.ascx" TagName="UsersList" TagPrefix="wsp"%>
<%@ Register Src="UserControls/UserSelector.ascx" TagName="UserSelector" 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" %>
@ -38,16 +37,6 @@
ErrorMessage="Enter Display Name" ValidationGroup="EditList" Display="Dynamic" Text="*" SetFocusOnError="True"></asp:RequiredFieldValidator>
<br />
<br />
</td>
</tr>
<tr>
<td class="FormLabel150"><asp:Localize ID="locManager" runat="server" meta:resourcekey="locManager" Text="Manager:"></asp:Localize></td>
<td>
<wsp:UserSelector id="manager" runat="server" />
<asp:CustomValidator runat="server"
ValidationGroup="EditList" meta:resourcekey="valManager" ID="valManager"
onservervalidate="valManager_ServerValidate" />
</td>
</tr>

View file

@ -65,8 +65,6 @@ namespace WebsitePanel.Portal.ExchangeServer
// bind form
txtDisplayName.Text = securityGroup.DisplayName;
manager.SetAccount(securityGroup.ManagerAccount);
members.SetAccounts(securityGroup.MembersAccounts);
txtNotes.Text = securityGroup.Notes;
@ -75,7 +73,6 @@ namespace WebsitePanel.Portal.ExchangeServer
{
txtDisplayName.ReadOnly = true;
txtNotes.ReadOnly = true;
manager.Enabled = false;
members.Enabled = false;
btnSave.Visible = false;
@ -98,7 +95,6 @@ namespace WebsitePanel.Portal.ExchangeServer
PanelRequest.ItemID,
PanelRequest.AccountID,
txtDisplayName.Text,
manager.GetAccount(),
members.GetAccounts(),
txtNotes.Text);
@ -122,11 +118,5 @@ namespace WebsitePanel.Portal.ExchangeServer
{
SaveSettings();
}
protected void valManager_ServerValidate(object source, ServerValidateEventArgs args)
{
args.IsValid = manager.GetAccount() != null;
}
}
}

View file

@ -111,33 +111,6 @@ namespace WebsitePanel.Portal.ExchangeServer {
/// </remarks>
protected global::System.Web.UI.WebControls.RequiredFieldValidator valRequireDisplayName;
/// <summary>
/// locManager 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 locManager;
/// <summary>
/// manager 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.UserSelector manager;
/// <summary>
/// valManager 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.CustomValidator valManager;
/// <summary>
/// locMembers control.
/// </summary>

View file

@ -4,10 +4,9 @@
<ContentTemplate>
<asp:TextBox ID="txtDisplayName" runat="server" CssClass="TextBox200" ReadOnly="true"></asp:TextBox>
<% if (Enabled) { %>
<asp:ImageButton ID="ImageButton1" SkinID="ExchangeAddressBook16" runat="server" CausesValidation="false" OnClick="ImageButton1_Click" />
<asp:LinkButton ID="cmdClear" runat="server" meta:resourcekey="cmdClear" OnClick="cmdClear_Click" CausesValidation="False"></asp:LinkButton>
<% } %>
<asp:Panel ID="AddAccountsPanel" runat="server" CssClass="Popup" style="display:none">
<table class="Popup-Header" cellpadding="0" cellspacing="0">

View file

@ -38,14 +38,6 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
{
public const string DirectionString = "DirectionString";
private bool _enabled = true;
public bool Enabled
{
get { return _enabled; }
set { _enabled = value; }
}
public bool IncludeMailboxes
{
get