diff --git a/WebsitePanel/Database/install_db.sql b/WebsitePanel/Database/install_db.sql index d3f98948..ce2eec74 100644 --- a/WebsitePanel/Database/install_db.sql +++ b/WebsitePanel/Database/install_db.sql @@ -3917,6 +3917,8 @@ INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDe GO INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (368, 12, 1, N'Exchange2007.IsConsumer',N'Is Consumer Organization',1, 0 , NULL) GO +INSERT [dbo].[Quotas] ([QuotaID], [GroupID],[QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (369, 12, 23,N'Exchange2007.EnablePlansEditing',N'Enable Plans Editing',1, 0 , NULL) +GO INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (370, 41, 1, N'Lync.Users', N'Users',2 ,0 , NULL) GO INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (371, 41, 2, N'Lync.Federation' , N'Allow Federation', 1, 0, NULL) diff --git a/WebsitePanel/Database/update_db.sql b/WebsitePanel/Database/update_db.sql index f615c958..be2d9848 100644 --- a/WebsitePanel/Database/update_db.sql +++ b/WebsitePanel/Database/update_db.sql @@ -173,6 +173,14 @@ INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDe END GO +IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'Exchange2007.EnablePlansEditing') +BEGIN +INSERT [dbo].[Quotas] ([QuotaID], [GroupID],[QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (369, 12, 23,N'Exchange2007.EnablePlansEditing',N'Enable Plans Editing',1, 0 , NULL) +END +GO + + + IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'Lync.Users') BEGIN INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (370, 41, 1, N'Lync.Users', N'Users',2 ,0 , NULL) diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/Quotas.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/Quotas.cs index 0915862a..3de5709c 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/Quotas.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/Quotas.cs @@ -110,6 +110,7 @@ order by rg.groupOrder public const string EXCHANGE2007_MAXSENDMESSAGESIZEKB = "Exchange2007.MaxSendMessageSizeKB"; // Max Send Message Size public const string EXCHANGE2007_MAXRECEIVEMESSAGESIZEKB = "Exchange2007.MaxReceiveMessageSizeKB"; // Max Receive Message Size public const string EXCHANGE2007_ISCONSUMER = "Exchange2007.IsConsumer"; // Is Consumer Organization + public const string EXCHANGE2007_ENABLEDPLANSEDITING = "Exchange2007.EnablePlansEditing"; // Enabled plans editing public const string MSSQL2000_DATABASES = "MsSQL2000.Databases"; // Databases public const string MSSQL2000_USERS = "MsSQL2000.Users"; // Users public const string MSSQL2000_MAXDATABASESIZE = "MsSQL2000.MaxDatabaseSize"; // Max Database Size diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx index b5e0f650..8e412c58 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx @@ -5005,6 +5005,9 @@ Consumer Organization Support + + Enable Mailbox Plans Editing + Error deleting organization domain name. See audit log for more details. @@ -5144,6 +5147,9 @@ Failed to set default mailbox plan. - Failed to stamp mailbox with a mailbox plan. + Failed to stamp mailbox with a mailbox plan. See storage allocation. + + + Specify a plan \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Code/Framework/PanelRequest.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Code/Framework/PanelRequest.cs index 3be9cb28..e70694a3 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Code/Framework/PanelRequest.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Code/Framework/PanelRequest.cs @@ -185,5 +185,11 @@ namespace WebsitePanel.Portal get { return HttpContext.Current.Request["Name"] != null ? HttpContext.Current.Request["Name"].Trim() : ""; } } + + public static string Context + { + get { return HttpContext.Current.Request["Context"]; } + } + } } \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Code/UserControls/Tab.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Code/UserControls/Tab.cs new file mode 100644 index 00000000..12ba211b --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Code/UserControls/Tab.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; + +namespace WebsitePanel.Portal.Code.UserControls +{ + public class Tab + { + string id; + string name; + string url; + + public Tab(string id, string name, string url) + { + this.id = id; + this.name = name; + this.url = url; + } + + public string Id + { + get { return this.id; } + set { this.id = value; } + } + + public string Name + { + get { return this.name; } + set { this.name = value; } + } + + public string Url + { + get { return this.url; } + set { this.url = value; } + } + + } +} + diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeCreateMailbox.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeCreateMailbox.ascx index 5cae78f8..ead2010e 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeCreateMailbox.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeCreateMailbox.ascx @@ -11,6 +11,23 @@ +
+ +
+
@@ -54,6 +71,21 @@ + + + + + + + +
+ +   + + +
+ +
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeCreateMailbox.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeCreateMailbox.ascx.cs index 359c7fe8..541d6021 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeCreateMailbox.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeCreateMailbox.ascx.cs @@ -79,7 +79,7 @@ namespace WebsitePanel.Portal.ExchangeServer btnCreate.Enabled = false; } - + PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId); if (cntx.Quotas.ContainsKey(Quotas.EXCHANGE2007_ISCONSUMER)) { @@ -134,6 +134,13 @@ namespace WebsitePanel.Portal.ExchangeServer messageBox.ShowResultMessage(accountId); return; } + else + { + if ((!string.IsNullOrEmpty(txtFirstName.Text)) | (!string.IsNullOrEmpty(txtLastName.Text)) | (!string.IsNullOrEmpty(txtInitials.Text))) + { + SetUserAttributes(accountId); + } + } Response.Redirect(EditUrl("AccountID", accountId.ToString(), "mailbox_settings", "SpaceID=" + PanelSecurity.PackageId.ToString(), @@ -145,6 +152,44 @@ namespace WebsitePanel.Portal.ExchangeServer } } + private void SetUserAttributes(int accountId) + { + OrganizationUser user = ES.Services.Organizations.GetUserGeneralSettings(PanelRequest.ItemID, accountId); + + ES.Services.Organizations.SetUserGeneralSettings( + PanelRequest.ItemID, accountId, + txtDisplayName.Text, + null, + false, + user.Disabled, + user.Locked, + + txtFirstName.Text, + txtInitials.Text, + txtLastName.Text, + + null, + null, + null, + null, + null, + + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + user.ExternalEmail, + txtSubscriberNumber.Text); + } + protected void rbtnUserExistingUser_CheckedChanged(object sender, EventArgs e) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeCreateMailbox.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeCreateMailbox.ascx.designer.cs index 2c5c9255..8569624f 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeCreateMailbox.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeCreateMailbox.ascx.designer.cs @@ -21,6 +21,15 @@ namespace WebsitePanel.Portal.ExchangeServer { /// protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks; + /// + /// divWrapper control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl divWrapper; + /// /// breadcrumb control. /// @@ -111,6 +120,60 @@ namespace WebsitePanel.Portal.ExchangeServer { /// protected global::System.Web.UI.HtmlControls.HtmlTable NewUserTable; + /// + /// locFirstName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Localize locFirstName; + + /// + /// txtFirstName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtFirstName; + + /// + /// locInitials control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Localize locInitials; + + /// + /// txtInitials control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtInitials; + + /// + /// locLastName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Localize locLastName; + + /// + /// txtLastName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtLastName; + /// /// locDisplayName control. /// diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx.cs index e0130314..c341445e 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx.cs @@ -67,7 +67,15 @@ namespace WebsitePanel.Portal.ExchangeServer ExchangeAccount account = ES.Services.ExchangeServer.GetAccount(PanelRequest.ItemID, PanelRequest.AccountID); chkPmmAllowed.Checked = (account.MailboxManagerActions & MailboxManagerActions.GeneralSettings) > 0; - mailboxPlanSelector.MailboxPlanId = account.MailboxPlanId.ToString(); + if (account.MailboxPlanId == 0) + { + mailboxPlanSelector.AddNone = true; + mailboxPlanSelector.MailboxPlanId = "-1"; + } + else + { + mailboxPlanSelector.MailboxPlanId = account.MailboxPlanId.ToString(); + } mailboxSize.QuotaUsedValue = Convert.ToInt32(stats.TotalSize / 1024 / 1024); mailboxSize.QuotaValue = (int)Math.Round((double)(stats.MaxSize / 1024 / 1024)); @@ -92,6 +100,12 @@ namespace WebsitePanel.Portal.ExchangeServer try { + if (mailboxPlanSelector.MailboxPlanId == "-1") + { + messageBox.ShowErrorMessage("EXCHANGE_SPECIFY_PLAN"); + return; + } + int result = ES.Services.ExchangeServer.SetMailboxGeneralSettings( PanelRequest.ItemID, PanelRequest.AccountID, chkHideAddressBook.Checked, diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxPlans.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxPlans.ascx.cs index 14e02ee2..6245182f 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxPlans.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxPlans.ascx.cs @@ -43,7 +43,22 @@ namespace WebsitePanel.Portal.ExchangeServer BindMailboxPlans(); txtStatus.Visible = false; + + if (PanelSecurity.LoggedUser.Role == UserRole.User) + { + PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId); + if (cntx.Quotas.ContainsKey(Quotas.EXCHANGE2007_ENABLEDPLANSEDITING)) + { + if (cntx.Quotas[Quotas.EXCHANGE2007_ENABLEDPLANSEDITING].QuotaAllocatedValue != 1) + { + gvMailboxPlans.Columns[2].Visible = false; + btnAddMailboxPlan.Enabled = btnAddMailboxPlan.Visible = false; + } + } + } + } + } public string GetMailboxPlanDisplayUrl(string MailboxPlanId) @@ -68,7 +83,6 @@ namespace WebsitePanel.Portal.ExchangeServer } btnSave.Enabled = (gvMailboxPlans.Rows.Count >= 1); - } public string IsChecked(bool val) @@ -141,8 +155,10 @@ namespace WebsitePanel.Portal.ExchangeServer int result = ES.Services.ExchangeServer.SetExchangeMailboxPlan(PanelRequest.ItemID, a.AccountId, Convert.ToInt32(mailboxPlanSelectorTarget.MailboxPlanId)); if (result < 0) { + BindMailboxPlans(); txtStatus.Text = "Error: " + a.AccountName; - break; + ShowErrorMessage("EXCHANGE_FAILED_TO_STAMP"); + return; } } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationCreateUser.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationCreateUser.ascx index 5b6364e0..3c72fc7d 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationCreateUser.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationCreateUser.ascx @@ -10,6 +10,23 @@ +
+ +
+
@@ -27,6 +44,21 @@
+ + + + + + + +
+ +   + + +
+ +
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationCreateUser.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationCreateUser.ascx.cs index ca2b314c..245da91f 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationCreateUser.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationCreateUser.ascx.cs @@ -29,6 +29,7 @@ using System; using WebsitePanel.EnterpriseServer; using WebsitePanel.Providers.ResultObjects; +using WebsitePanel.Providers.HostedSolution; namespace WebsitePanel.Portal.HostedSolution @@ -103,15 +104,61 @@ namespace WebsitePanel.Portal.HostedSolution messageBox.ShowResultMessage(accountId); return; } + else + { + if ((!string.IsNullOrEmpty(txtFirstName.Text)) | (!string.IsNullOrEmpty(txtLastName.Text)) | (!string.IsNullOrEmpty(txtInitials.Text))) + { + SetUserAttributes(accountId); + } + } Response.Redirect(EditUrl("AccountID", accountId.ToString(), "edit_user", "SpaceID=" + PanelSecurity.PackageId, - "ItemID=" + PanelRequest.ItemID)); + "ItemID=" + PanelRequest.ItemID, + "Context=User")); } catch (Exception ex) { messageBox.ShowErrorMessage("EXCHANGE_CREATE_MAILBOX", ex); } } + + private void SetUserAttributes(int accountId) + { + OrganizationUser user = ES.Services.Organizations.GetUserGeneralSettings(PanelRequest.ItemID, accountId); + + ES.Services.Organizations.SetUserGeneralSettings( + PanelRequest.ItemID, accountId, + txtDisplayName.Text, + null, + false, + user.Disabled, + user.Locked, + + txtFirstName.Text, + txtInitials.Text, + txtLastName.Text, + + null, + null, + null, + null, + null, + + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + user.ExternalEmail, + txtSubscriberNumber.Text); + } } } \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationCreateUser.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationCreateUser.ascx.designer.cs index 58973475..5d58f6f3 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationCreateUser.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationCreateUser.ascx.designer.cs @@ -21,6 +21,15 @@ namespace WebsitePanel.Portal.HostedSolution { /// protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks; + /// + /// divWrapper control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl divWrapper; + /// /// breadcrumb control. /// @@ -66,6 +75,60 @@ namespace WebsitePanel.Portal.HostedSolution { /// protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox; + /// + /// locFirstName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Localize locFirstName; + + /// + /// txtFirstName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtFirstName; + + /// + /// locInitials control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Localize locInitials; + + /// + /// txtInitials control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtInitials; + + /// + /// locLastName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Localize locLastName; + + /// + /// txtLastName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtLastName; + /// /// locDisplayName control. /// diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx index 710b4e40..84d34f1f 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx @@ -11,6 +11,7 @@ +<%@ Register src="UserControls/UserTabs.ascx" tagname="UserTabs" tagprefix="uc1" %> <%@ Register src="UserControls/MailboxTabs.ascx" tagname="MailboxTabs" tagprefix="uc1" %> @@ -35,11 +36,10 @@
- + + - - @@ -84,7 +84,7 @@ diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx.cs index 1f2131dd..3d425536 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx.cs @@ -42,6 +42,8 @@ namespace WebsitePanel.Portal.HostedSolution { BindSettings(); + MailboxTabsId.Visible = (PanelRequest.Context == "Mailbox"); + UserTabsId.Visible = (PanelRequest.Context == "User"); } } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx.designer.cs index aabeb89d..d769068c 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx.designer.cs @@ -67,13 +67,22 @@ namespace WebsitePanel.Portal.HostedSolution { protected global::System.Web.UI.WebControls.Literal litDisplayName; /// - /// MailboxTabs1 control. + /// UserTabsId control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::WebsitePanel.Portal.ExchangeServer.UserControls.MailboxTabs MailboxTabs1; + protected global::WebsitePanel.Portal.ExchangeServer.UserControls.UserTabs UserTabsId; + + /// + /// MailboxTabsId control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.ExchangeServer.UserControls.MailboxTabs MailboxTabsId; /// /// messageBox control. diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUsers.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUsers.ascx.cs index 980d4a3d..1402333b 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUsers.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUsers.ascx.cs @@ -74,7 +74,8 @@ namespace WebsitePanel.Portal.HostedSolution { return EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "edit_user", "AccountID=" + accountId, - "ItemID=" + PanelRequest.ItemID); + "ItemID=" + PanelRequest.ItemID, + "Context=User"); } protected void odsAccountsPaged_Selected(object sender, ObjectDataSourceStatusEventArgs e) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/MailboxTabs.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/MailboxTabs.ascx.resx index e969fd9b..f994c831 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/MailboxTabs.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/MailboxTabs.ascx.resx @@ -123,25 +123,25 @@ Advanced + + General + Mail Flow Settings + + Mobile Devices + Permissions - General + Settings Setup Instructions - - Mobile Devices - Spam - - Mailbox - \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/UserTabs.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/UserTabs.ascx.resx new file mode 100644 index 00000000..fe15515c --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/UserTabs.ascx.resx @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Advanced + + + General + + + Settings + + + Setup Instructions + + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/ContactTabs.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/ContactTabs.ascx.cs index 15124e1d..cd9a05f8 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/ContactTabs.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/ContactTabs.ascx.cs @@ -37,6 +37,7 @@ using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; +using WebsitePanel.Portal.Code.UserControls; namespace WebsitePanel.Portal.ExchangeServer.UserControls { diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/DistributionListTabs.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/DistributionListTabs.ascx.cs index 85dfff00..9f2cd8b7 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/DistributionListTabs.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/DistributionListTabs.ascx.cs @@ -28,6 +28,7 @@ using System; using System.Collections.Generic; +using WebsitePanel.Portal.Code.UserControls; namespace WebsitePanel.Portal.ExchangeServer.UserControls { diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/MailboxTabs.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/MailboxTabs.ascx index 99ca711d..ab24ee94 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/MailboxTabs.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/MailboxTabs.ascx @@ -2,7 +2,7 @@
- +
- + diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/MailboxTabs.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/MailboxTabs.ascx.cs index 5994422d..4b575d52 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/MailboxTabs.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/MailboxTabs.ascx.cs @@ -28,44 +28,12 @@ using System; using System.Collections.Generic; +using WebsitePanel.Portal.Code.UserControls; namespace WebsitePanel.Portal.ExchangeServer.UserControls { - class Tab - { - string id; - string name; - string url; - - public Tab(string id, string name, string url) - { - this.id = id; - this.name = name; - this.url = url; - } - - public string Id - { - get { return this.id; } - set { this.id = value; } - } - - public string Name - { - get { return this.name; } - set { this.name = value; } - } - - public string Url - { - get { return this.url; } - set { this.url = value; } - } - } - public partial class MailboxTabs : WebsitePanelControlBase { - public const string ADUserTabs = "ADUserTabs"; private string selectedTab; public string SelectedTab { @@ -73,31 +41,25 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls set { selectedTab = value; } } - public bool IsADUserTabs - { - get { return ViewState[ADUserTabs] != null ? Utils.ParseBool(ViewState[ADUserTabs].ToString(), false) : false; } - set { ViewState[ADUserTabs] = value; } - } protected void Page_Load(object sender, EventArgs e) { - if (IsADUserTabs) - BindAdUserTabs(); - else - BindTabs(); + BindTabs(); } private void BindTabs() { List tabsList = new List(); - tabsList.Add(CreateTab("mailbox_settings", "Tab.Mailbox")); + tabsList.Add(CreateTab("edit_user", "Tab.General")); + tabsList.Add(CreateTab("mailbox_settings", "Tab.Settings")); tabsList.Add(CreateTab("mailbox_addresses", "Tab.Addresses")); tabsList.Add(CreateTab("mailbox_mailflow", "Tab.Mailflow")); tabsList.Add(CreateTab("mailbox_permissions", "Tab.Permissions")); tabsList.Add(CreateTab("mailbox_setup", "Tab.Setup")); tabsList.Add(CreateTab("mailbox_mobile", "Tab.Mobile")); //tabsList.Add(CreateTab("mailbddox_spam", "Tab.Spam")); - + + // find selected menu item int idx = 0; @@ -113,32 +75,13 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls dlTabs.DataBind(); } - private void BindAdUserTabs() - { - List tabsList = new List(); - tabsList.Add(CreateTab("edit_user", "Tab.Settings")); - tabsList.Add(CreateTab("organization_user_setup", "Tab.Setup")); - - // find selected menu item - int idx = 0; - foreach (Tab tab in tabsList) - { - if (String.Compare(tab.Id, SelectedTab, true) == 0) - break; - idx++; - } - dlTabs.SelectedIndex = idx; - - dlTabs.DataSource = tabsList; - dlTabs.DataBind(); - } - private Tab CreateTab(string id, string text) { return new Tab(id, GetLocalizedString(text), HostModule.EditUrl("AccountID", PanelRequest.AccountID.ToString(), id, "SpaceID=" + PanelSecurity.PackageId.ToString(), - "ItemID=" + PanelRequest.ItemID.ToString())); + "ItemID=" + PanelRequest.ItemID.ToString(), + "Context=Mailbox")); } } } \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/MailboxTabs.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/MailboxTabs.ascx.designer.cs index 13991577..bb8adcea 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/MailboxTabs.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/MailboxTabs.ascx.designer.cs @@ -1,10 +1,9 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.4927 // // Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// the code is regenerated. // //------------------------------------------------------------------------------ diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/PublicFolderTabs.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/PublicFolderTabs.ascx.cs index 0aed7ba7..432820dd 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/PublicFolderTabs.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/PublicFolderTabs.ascx.cs @@ -37,6 +37,7 @@ using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; +using WebsitePanel.Portal.Code.UserControls; namespace WebsitePanel.Portal.ExchangeServer.UserControls { diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/UserTabs.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/UserTabs.ascx new file mode 100644 index 00000000..f562504a --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/UserTabs.ascx @@ -0,0 +1,27 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UserTabs.ascx.cs" Inherits="WebsitePanel.Portal.ExchangeServer.UserControls.UserTabs" %> + + + + +
+ + + + + + <%# Eval("Name") %> + + + + + + <%# Eval("Name") %> + + + +   + + +
+
\ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/UserTabs.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/UserTabs.ascx.cs new file mode 100644 index 00000000..d02021e4 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/UserTabs.ascx.cs @@ -0,0 +1,78 @@ +// 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.Collections.Generic; +using WebsitePanel.Portal.Code.UserControls; + +namespace WebsitePanel.Portal.ExchangeServer.UserControls +{ + public partial class UserTabs : WebsitePanelControlBase + { + private string selectedTab; + public string SelectedTab + { + get { return selectedTab; } + set { selectedTab = value; } + } + + protected void Page_Load(object sender, EventArgs e) + { + BindTabs(); + } + + private void BindTabs() + { + List tabsList = new List(); + tabsList.Add(CreateTab("edit_user", "Tab.General")); + tabsList.Add(CreateTab("organization_user_setup", "Tab.Setup")); + + // find selected menu item + int idx = 0; + foreach (Tab tab in tabsList) + { + if (String.Compare(tab.Id, SelectedTab, true) == 0) + break; + idx++; + } + dlTabs.SelectedIndex = idx; + + dlTabs.DataSource = tabsList; + dlTabs.DataBind(); + } + + private Tab CreateTab(string id, string text) + { + return new Tab(id, GetLocalizedString(text), + HostModule.EditUrl("AccountID", PanelRequest.AccountID.ToString(), id, + "SpaceID=" + PanelSecurity.PackageId.ToString(), + "ItemID=" + PanelRequest.ItemID.ToString(), + "Context=User")); + } + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/UserTabs.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/UserTabs.ascx.designer.cs new file mode 100644 index 00000000..2bde8a0b --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/UserTabs.ascx.designer.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace WebsitePanel.Portal.ExchangeServer.UserControls { + + + public partial class UserTabs { + + /// + /// dlTabs control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DataList dlTabs; + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj index 1e873ce9..b8d62b5d 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj @@ -200,6 +200,7 @@ + ExchangeAddMailboxPlan.ascx ASPXCodeBehind @@ -225,6 +226,13 @@ MailboxPlanSelector.ascx + + UserTabs.ascx + ASPXCodeBehind + + + UserTabs.ascx + LyncAddFederationDomain.ascx ASPXCodeBehind @@ -3754,6 +3762,7 @@ + @@ -4894,6 +4903,7 @@ + Designer