From ec13a31c5cd7e03c31c1f95fd3de3f06aa20f968 Mon Sep 17 00:00:00 2001 From: me Date: Wed, 18 Feb 2015 16:16:24 +0400 Subject: [PATCH 01/13] fix Actions List --- .../UserControls/SpaceServiceItems.ascx.cs | 14 ++++++++------ .../DesktopModules/WebsitePanel/WebSites.ascx | 3 +-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/SpaceServiceItems.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/SpaceServiceItems.ascx.cs index a95ef8a9..36b6e71f 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/SpaceServiceItems.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/SpaceServiceItems.ascx.cs @@ -91,12 +91,6 @@ namespace WebsitePanel.Portal.UserControls set { EnsureChildControls(); QuotasPanel.Visible = value; } } - public bool ShowActions - { - get { EnsureChildControls(); return QuotasPanel.Visible; } - set { EnsureChildControls(); websiteActions.Visible = value; } - } - protected void Page_Load(object sender, EventArgs e) { //HideServiceColumns(gvWebSites); @@ -119,6 +113,14 @@ namespace WebsitePanel.Portal.UserControls (PanelSecurity.SelectedUser.Role != UserRole.User) && chkRecursive.Checked; gvItems.Columns[5].Visible = (PanelSecurity.SelectedUser.Role == UserRole.Administrator); gvItems.Columns[6].Visible = (PanelSecurity.EffectiveUser.Role == UserRole.Administrator); + if (QuotaName == "Web.Sites") + { + websiteActions.Visible = true; + } + else + { + websiteActions.Visible = false; + } if (!IsPostBack) { diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSites.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSites.ascx index 2da7d722..517cd7cc 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSites.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSites.ascx @@ -9,5 +9,4 @@ CreateControlID="add_site" GroupName="Web" TypeName="WebsitePanel.Providers.Web.WebSite, WebsitePanel.Providers.Base" - QuotaName="Web.Sites" - ShowActions = "True" /> \ No newline at end of file + QuotaName="Web.Sites" /> \ No newline at end of file From 4c92928e4c4ce6b8d93f1aa81101c1eba21d89be Mon Sep 17 00:00:00 2001 From: me Date: Wed, 18 Feb 2015 22:21:51 +0400 Subject: [PATCH 02/13] spelling fix --- .../WebsitePanel/UserControls/DomainActions.ascx | 4 ++-- .../DesktopModules/WebsitePanel/UserControls/UserActions.ascx | 4 ++-- .../WebsitePanel/UserControls/WebsiteActions.ascx | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/DomainActions.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/DomainActions.ascx index 8e4d30a6..e29e4367 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/DomainActions.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/DomainActions.ascx @@ -1,7 +1,7 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="DomainActions.ascx.cs" Inherits="WebsitePanel.Portal.DomainActions" %> @@ -25,10 +26,30 @@ - - + + + <%-- + + + +
+
+
+ +
+
+ +
+
+ +
+
+
+
--%> +
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSLocalAdmins.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSLocalAdmins.ascx.cs new file mode 100644 index 00000000..6125bc19 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSLocalAdmins.ascx.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace WebsitePanel.Portal.RDS +{ + public partial class RdsLocalAdmins : WebsitePanelModuleBase + { + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + var organizationUsers = ES.Services.Organizations.GetOrganizationUsersPaged(PanelRequest.ItemID, null, null, null, 0, Int32.MaxValue).PageUsers; + var collectionLocalAdmins = ES.Services.RDS.GetRdsCollectionLocalAdmins(PanelRequest.ItemID); + var collection = ES.Services.RDS.GetRdsCollection(PanelRequest.CollectionID); + + litCollectionName.Text = collection.DisplayName; + users.SetUsers(collectionLocalAdmins); + } + } + + private bool SaveLocalAdmins() + { + try + { + ES.Services.RDS.SaveRdsCollectionLocalAdmins(users.GetUsers(), PanelRequest.ItemID); + } + catch (Exception ex) + { + messageBox.ShowErrorMessage(ex.Message); + return false; + } + + return true; + } + + protected void btnSave_Click(object sender, EventArgs e) + { + if (!Page.IsValid) + { + return; + } + + SaveLocalAdmins(); + } + + protected void btnSaveExit_Click(object sender, EventArgs e) + { + if (!Page.IsValid) + { + return; + } + + if (SaveLocalAdmins()) + { + Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "rds_collections", "SpaceID=" + PanelSecurity.PackageId)); + } + } + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSLocalAdmins.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSLocalAdmins.ascx.designer.cs new file mode 100644 index 00000000..f9e420c9 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSLocalAdmins.ascx.designer.cs @@ -0,0 +1,105 @@ +//------------------------------------------------------------------------------ +// +// 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.RDS { + + + public partial class RdsLocalAdmins { + + /// + /// asyncTasks control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks; + + /// + /// imgEditRDSCollection control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Image imgEditRDSCollection; + + /// + /// locTitle control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Localize locTitle; + + /// + /// litCollectionName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Literal litCollectionName; + + /// + /// messageBox control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox; + + /// + /// tabs control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.RDS.UserControls.RdsServerTabs tabs; + + /// + /// secRdsLocalAdmins control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.CollapsiblePanel secRdsLocalAdmins; + + /// + /// panelRdsLocalAdmins control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel panelRdsLocalAdmins; + + /// + /// users control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.RDS.UserControls.RDSCollectionUsers users; + + /// + /// buttonPanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.ItemButtonPanel buttonPanel; + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RdsLocalAdmins.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RdsLocalAdmins.ascx new file mode 100644 index 00000000..d171b517 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RdsLocalAdmins.ascx @@ -0,0 +1,45 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RDSLocalAdmins.ascx.cs" Inherits="WebsitePanel.Portal.RDS.RdsLocalAdmins" %> +<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %> +<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %> +<%@ Register Src="UserControls/RDSCollectionTabs.ascx" TagName="CollectionTabs" TagPrefix="wsp" %> +<%@ Register TagPrefix="wsp" TagName="CollapsiblePanel" Src="../UserControls/CollapsiblePanel.ascx" %> +<%@ Register Src="../UserControls/ItemButtonPanel.ascx" TagName="ItemButtonPanel" TagPrefix="wsp" %> +<%@ Register Src="UserControls/RDSCollectionUsers.ascx" TagName="CollectionUsers" TagPrefix="wsp"%> + + + + +
+
+
+
+
+
+
+ + + - + +
+
+ + + + + + + +
+ +
+
+
+ +
+
+
+
+
+
\ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/App_LocalResources/RDSCollectionTabs.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/App_LocalResources/RDSCollectionTabs.ascx.resx index afb4730a..9f6daa9d 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/App_LocalResources/RDSCollectionTabs.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/App_LocalResources/RDSCollectionTabs.ascx.resx @@ -132,4 +132,7 @@ User Sessions + + Local Administrators + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/RDSCollectionTabs.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/RDSCollectionTabs.ascx.cs index 00fab605..8336747f 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/RDSCollectionTabs.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/RDSCollectionTabs.ascx.cs @@ -25,6 +25,7 @@ namespace WebsitePanel.Portal.RDS.UserControls tabsList.Add(CreateTab("rds_collection_edit_apps", "Tab.RdsApplications")); tabsList.Add(CreateTab("rds_collection_edit_users", "Tab.RdsUsers")); tabsList.Add(CreateTab("rds_collection_user_sessions", "Tab.UserSessions")); + tabsList.Add(CreateTab("rds_collection_local_admins", "Tab.LocalAdmins")); int idx = 0; 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 046875ad..459ea738 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj @@ -330,6 +330,13 @@ RDSCollections.ascx + + RDSLocalAdmins.ascx + ASPXCodeBehind + + + RDSLocalAdmins.ascx + RDSUserSessions.ascx ASPXCodeBehind @@ -4372,6 +4379,7 @@ + @@ -4395,6 +4403,7 @@ Designer + ResXFileCodeGenerator DomainLookupView.ascx.Designer.cs From 072b92a0291041410eb5841fc5f235e5317234e6 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Thu, 19 Feb 2015 10:34:28 -0500 Subject: [PATCH 05/13] Added tag build-2.1.0.588 for changeset a192c0accad3 From 1220a131a493449a8beca2328e72985bc1d49a03 Mon Sep 17 00:00:00 2001 From: me Date: Sat, 21 Feb 2015 10:44:17 +0400 Subject: [PATCH 06/13] wsp-10318 Smart mail shows not detailed error on simple password --- .../Common/BusinessErrorCodes.cs | 1 + .../MailServers/MailServerController.cs | 11 +++++++++- .../SmarterMail10.cs | 20 ++++++++++++++----- .../WebsitePanel_SharedResources.ascx.resx | 3 +++ .../MailAccountsEditAccount.ascx.cs | 15 +++++++++++--- 5 files changed, 41 insertions(+), 9 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Common/BusinessErrorCodes.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Common/BusinessErrorCodes.cs index 8e8ed5ff..dc4f432d 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Common/BusinessErrorCodes.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Common/BusinessErrorCodes.cs @@ -151,6 +151,7 @@ namespace WebsitePanel.EnterpriseServer public const int ERROR_MAIL_LICENSE_USERS_QUOTA = -724; public const int ERROR_MAIL_ACCOUNT_MAX_MAILBOX_SIZE_LIMIT = -725; + public const int ERROR_MAIL_ACCOUNT_PASSWORD_NOT_COMPLEXITY = -726; #endregion #region FTP diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/MailServers/MailServerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/MailServers/MailServerController.cs index 82b7e117..460b7dae 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/MailServers/MailServerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/MailServers/MailServerController.cs @@ -159,7 +159,11 @@ namespace WebsitePanel.EnterpriseServer { return BusinessErrorCodes.ERROR_MAIL_LICENSE_DOMAIN_QUOTA; } - if (ex.Message != null && ex.Message.Contains("The maximum number of users for the server has been reached")) + if (ex.Message.Contains("Password doesn't meet complexity")) + { + return BusinessErrorCodes.ERROR_MAIL_ACCOUNT_PASSWORD_NOT_COMPLEXITY; + } + if (ex.Message.Contains("The maximum number of users for the server has been reached")) { return BusinessErrorCodes.ERROR_MAIL_LICENSE_USERS_QUOTA; } @@ -224,6 +228,11 @@ namespace WebsitePanel.EnterpriseServer } catch (Exception ex) { + if (ex.Message.Contains("Password doesn't meet complexity")) + { + return BusinessErrorCodes.ERROR_MAIL_ACCOUNT_PASSWORD_NOT_COMPLEXITY; + } + throw TaskManager.WriteError(ex); } finally diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail10/SmarterMail10.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail10/SmarterMail10.cs index a4b1f28f..4c4f965a 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail10/SmarterMail10.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail10/SmarterMail10.cs @@ -1171,8 +1171,13 @@ namespace WebsitePanel.Providers.Mail mailbox.IsDomainAdmin // domain admin is false ); - if (!result.Result) - throw new Exception(result.Message); + if (!result.Result) + { + if (result.ResultCode == -21) + throw new Exception("Password doesn't meet complexity", new Exception(result.Message)); + + throw new Exception(result.Message); + } // set forwarding settings result = users.UpdateUserForwardingInfo(AdminUsername, AdminPassword, @@ -1232,10 +1237,15 @@ namespace WebsitePanel.Providers.Mail GenericResult result = users.UpdateUser( AdminUsername, AdminPassword, mailbox.Name, strPassword, mailbox.FirstName, mailbox.LastName, mailbox.IsDomainAdmin); - if (!result.Result) - throw new Exception(result.Message); + if (!result.Result) + { + if (result.ResultCode == -21) + throw new Exception("Password doesn't meet complexity", new Exception(result.Message)); + + throw new Exception(result.Message); + } - // set forwarding settings + // set forwarding settings result = users.UpdateUserForwardingInfo(AdminUsername, AdminPassword, mailbox.Name, mailbox.DeleteOnForward, (mailbox.ForwardingAddresses != null ? String.Join(", ", mailbox.ForwardingAddresses) : "")); 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 482edee5..4eb03c69 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx @@ -402,6 +402,9 @@ Error updating mail account + + Password doesn't meet complexity. Perhaps the password length is less 5 characters. + Error updating mail domain diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/MailAccountsEditAccount.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/MailAccountsEditAccount.ascx.cs index 3418cca8..bc1bdca0 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/MailAccountsEditAccount.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/MailAccountsEditAccount.ascx.cs @@ -235,9 +235,9 @@ namespace WebsitePanel.Portal try { int result = ES.Services.MailServers.AddMailAccount(item); - if (result < 0) + if (result == BusinessErrorCodes.ERROR_MAIL_ACCOUNT_PASSWORD_NOT_COMPLEXITY) { - ShowResultMessage(result); + ShowErrorMessage("MAIL_ACCOUNT_PASSWORD_NOT_COMPLEXITY"); return; } if (result == BusinessErrorCodes.ERROR_MAIL_LICENSE_DOMAIN_QUOTA) @@ -250,7 +250,11 @@ namespace WebsitePanel.Portal ShowResultMessage(result); return; } - + if (result < 0) + { + ShowResultMessage(result); + return; + } } catch (Exception ex) { @@ -264,6 +268,11 @@ namespace WebsitePanel.Portal try { int result = ES.Services.MailServers.UpdateMailAccount(item); + if (result == BusinessErrorCodes.ERROR_MAIL_ACCOUNT_PASSWORD_NOT_COMPLEXITY) + { + ShowErrorMessage("MAIL_ACCOUNT_PASSWORD_NOT_COMPLEXITY"); + return; + } if (result < 0) { ShowResultMessage(result); From 82efa08870e455a5fd7c7292f874fc2b4e549883 Mon Sep 17 00:00:00 2001 From: me Date: Sat, 21 Feb 2015 14:01:11 +0400 Subject: [PATCH 07/13] wsp-10317 (Update sql) Add enable\disable users ability for smart mail integration + multi-actions --- WebsitePanel/Database/install_db.sql | 2 +- WebsitePanel/Database/update_db.sql | 10 + .../MailServers/MailServerController.cs | 2 - .../Mail/MailAccount.cs | 2 +- .../SmarterMail100_EditAccount.ascx.resx | 168 +++++++ .../SmarterMail100_EditDomain.ascx.resx | 171 +++++++ ...arterMail100_EditDomain_Features.ascx.resx | 168 +++++++ ...marterMail100_EditDomain_Sharing.ascx.resx | 138 ++++++ ...terMail100_EditDomain_Throttling.ascx.resx | 132 ++++++ .../SmarterMail100_EditForwarding.ascx.resx | 101 +++++ .../SmarterMail100_EditGroup.ascx.resx | 123 +++++ .../SmarterMail100_EditList.ascx.resx | 219 +++++++++ .../SmarterMail100_Settings.ascx.resx | 150 ++++++ .../SmarterMail100_EditAccount.ascx | 114 +++++ .../SmarterMail100_EditAccount.ascx.cs | 75 +++ ...marterMail100_EditAccount.ascx.designer.cs | 240 ++++++++++ .../SmarterMail100_EditDomain.ascx | 145 ++++++ .../SmarterMail100_EditDomain.ascx.cs | 183 ++++++++ ...SmarterMail100_EditDomain.ascx.designer.cs | 429 ++++++++++++++++++ .../SmarterMail100_EditDomain_Features.ascx | 69 +++ ...SmarterMail100_EditDomain_Features.ascx.cs | 71 +++ ...il100_EditDomain_Features.ascx.designer.cs | 213 +++++++++ .../SmarterMail100_EditDomain_Sharing.ascx | 27 ++ .../SmarterMail100_EditDomain_Sharing.ascx.cs | 63 +++ ...ail100_EditDomain_Sharing.ascx.designer.cs | 123 +++++ .../SmarterMail100_EditDomain_Throttling.ascx | 45 ++ ...arterMail100_EditDomain_Throttling.ascx.cs | 79 ++++ ...100_EditDomain_Throttling.ascx.designer.cs | 177 ++++++++ .../SmarterMail100_EditForwarding .ascx | 1 + .../SmarterMail100_EditForwarding .ascx.cs | 51 +++ ...erMail100_EditForwarding .ascx.designer.cs | 15 + .../SmarterMail100_EditGroup.ascx | 12 + .../SmarterMail100_EditGroup.ascx.cs | 51 +++ .../SmarterMail100_EditGroup.ascx.designer.cs | 33 ++ .../SmarterMail100_EditList.ascx | 175 +++++++ .../SmarterMail100_EditList.ascx.cs | 210 +++++++++ .../SmarterMail100_EditList.ascx.designer.cs | 393 ++++++++++++++++ .../SmarterMail100_Settings.ascx | 62 +++ .../SmarterMail100_Settings.ascx.cs | 66 +++ .../SmarterMail100_Settings.ascx.designer.cs | 150 ++++++ .../MailAccountActions.ascx.resx | 132 ++++++ .../UserControls/MailAccountActions.ascx | 31 ++ .../UserControls/MailAccountActions.ascx.cs | 109 +++++ .../MailAccountActions.ascx.designer.cs | 42 ++ .../UserControls/SpaceServiceItems.ascx | 5 + .../UserControls/SpaceServiceItems.ascx.cs | 28 +- .../SpaceServiceItems.ascx.designer.cs | 9 + .../WebsitePanel.Portal.Modules.csproj | 108 +++++ 48 files changed, 5110 insertions(+), 12 deletions(-) create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/SmarterMail100_EditAccount.ascx.resx create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/SmarterMail100_EditDomain.ascx.resx create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/SmarterMail100_EditDomain_Features.ascx.resx create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/SmarterMail100_EditDomain_Sharing.ascx.resx create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/SmarterMail100_EditDomain_Throttling.ascx.resx create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/SmarterMail100_EditForwarding.ascx.resx create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/SmarterMail100_EditGroup.ascx.resx create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/SmarterMail100_EditList.ascx.resx create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/SmarterMail100_Settings.ascx.resx create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditAccount.ascx create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditAccount.ascx.cs create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditAccount.ascx.designer.cs create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditDomain.ascx create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditDomain.ascx.cs create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditDomain.ascx.designer.cs create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditDomain_Features.ascx create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditDomain_Features.ascx.cs create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditDomain_Features.ascx.designer.cs create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditDomain_Sharing.ascx create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditDomain_Sharing.ascx.cs create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditDomain_Sharing.ascx.designer.cs create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditDomain_Throttling.ascx create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditDomain_Throttling.ascx.cs create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditDomain_Throttling.ascx.designer.cs create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditForwarding .ascx create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditForwarding .ascx.cs create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditForwarding .ascx.designer.cs create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditGroup.ascx create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditGroup.ascx.cs create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditGroup.ascx.designer.cs create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditList.ascx create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditList.ascx.cs create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditList.ascx.designer.cs create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_Settings.ascx create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_Settings.ascx.cs create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_Settings.ascx.designer.cs create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/App_LocalResources/MailAccountActions.ascx.resx create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/MailAccountActions.ascx create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/MailAccountActions.ascx.cs create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/MailAccountActions.ascx.designer.cs diff --git a/WebsitePanel/Database/install_db.sql b/WebsitePanel/Database/install_db.sql index 5ce2c55b..a0f5162d 100644 --- a/WebsitePanel/Database/install_db.sql +++ b/WebsitePanel/Database/install_db.sql @@ -41836,7 +41836,7 @@ INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName] GO INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (65, 4, N'SmarterMail', N'SmarterMail 9.x', N'WebsitePanel.Providers.Mail.SmarterMail9, WebsitePanel.Providers.Mail.SmarterMail9', N'SmarterMail60', NULL) GO -INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (66, 4, N'SmarterMail', N'SmarterMail 10.x +', N'WebsitePanel.Providers.Mail.SmarterMail10, WebsitePanel.Providers.Mail.SmarterMail10', N'SmarterMail60', NULL) +INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (66, 4, N'SmarterMail', N'SmarterMail 10.x +', N'WebsitePanel.Providers.Mail.SmarterMail10, WebsitePanel.Providers.Mail.SmarterMail10', N'SmarterMail100', NULL) GO INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (90, 12, N'Exchange2010SP2', N'Hosted Microsoft Exchange Server 2010 SP2', N'WebsitePanel.Providers.HostedSolution.Exchange2010SP2, WebsitePanel.Providers.HostedSolution', N'Exchange', NULL) GO diff --git a/WebsitePanel/Database/update_db.sql b/WebsitePanel/Database/update_db.sql index 1f3b5c1c..55cba5c9 100644 --- a/WebsitePanel/Database/update_db.sql +++ b/WebsitePanel/Database/update_db.sql @@ -8690,4 +8690,14 @@ UPDATE WebDavPortalUsersSettings SET Settings = @Settings WHERE AccountId = @AccountId +GO + +IF NOT EXISTS (SELECT * FROM [dbo].[Providers] WHERE [DisplayName] = 'SmarterMail 10.x +') +BEGIN +INSERT [dbo].[Providers] ([ProviderId], [GroupId], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES(66, 4, N'SmarterMail', N'SmarterMail 10.x +', N'WebsitePanel.Providers.Mail.SmarterMail10, WebsitePanel.Providers.Mail.SmarterMail10', N'SmarterMail100', NULL) +END +ELSE +BEGIN +UPDATE [dbo].[Providers] SET [EditorControl] = 'SmarterMail100' WHERE [DisplayName] = 'SmarterMail 10.x +' +END GO \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/MailServers/MailServerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/MailServers/MailServerController.cs index 460b7dae..5bfb9ea7 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/MailServers/MailServerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/MailServers/MailServerController.cs @@ -137,7 +137,6 @@ namespace WebsitePanel.EnterpriseServer return domainResult; // create service item - item.Enabled = true; item.MaxMailboxSize = GetMaxMailBoxSize(item.PackageId, item); // add service item @@ -207,7 +206,6 @@ namespace WebsitePanel.EnterpriseServer MailServer mail = new MailServer(); ServiceProviderProxy.Init(mail, origItem.ServiceId); item.Name = origItem.Name; - item.Enabled = true; item.MaxMailboxSize = GetMaxMailBoxSize(origItem.PackageId, item); diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Mail/MailAccount.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Mail/MailAccount.cs index 3fbba76b..3dedd942 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Mail/MailAccount.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Mail/MailAccount.cs @@ -33,7 +33,7 @@ namespace WebsitePanel.Providers.Mail [Serializable] public class MailAccount : ServiceProviderItem { - private bool enabled; + private bool enabled = true; private string password; private string replyTo; private bool responderEnabled; diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/SmarterMail100_EditAccount.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/SmarterMail100_EditAccount.ascx.resx new file mode 100644 index 00000000..8fff32aa --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/SmarterMail100_EditAccount.ascx.resx @@ -0,0 +1,168 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + Change Password + + + Domain Administrator + + + Domain Administrator + + + Account enabled + + + Delete Message on Forward + + + Yes + + + First Name: + + + Forward Mail to Address: + + + Last Name: + + + Message: + + + Reply to Address: + + + Enable Autoresponder: + + + Signature: + + + Subject: + + + Autoresponder + + + Mail Forwarding + + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/SmarterMail100_EditDomain.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/SmarterMail100_EditDomain.ascx.resx new file mode 100644 index 00000000..4616891f --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/SmarterMail100_EditDomain.ascx.resx @@ -0,0 +1,171 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Abuse Account: + + + Catch-All Account: + + + Domain Aliases : + + + Domain Disk Space, MB : + + + Mailing Lists : + + + Max Message Size, KB : + + + POP Retrieval Accounts: + + + Postmaster Account: + + + Max Recipients per Message : + + + User Aliases : + + + Users : + + + Features + + + Limits + + + Sharing + + + Technical + + + Throttling + + + <Not Selected> + + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/SmarterMail100_EditDomain_Features.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/SmarterMail100_EditDomain_Features.ascx.resx new file mode 100644 index 00000000..f89e910b --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/SmarterMail100_EditDomain_Features.ascx.resx @@ -0,0 +1,168 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Enable Catch-Alls + + + Enable IMAP Retreival + + + Enable Email Reports + + + Enable Mail Signing + + + Enable POP Retrieval + + + Enable SyncML + + + Pop Retreival + + + Calendar + + + Contacts + + + Domain Content Filtering + + + Domain Aliases + + + Domain Reports + + + Mailing Lists + + + Notes + + + Domain Spam Options + + + Tasks + + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/SmarterMail100_EditDomain_Sharing.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/SmarterMail100_EditDomain_Sharing.ascx.resx new file mode 100644 index 00000000..d2cff0bf --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/SmarterMail100_EditDomain_Sharing.ascx.resx @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Global Address List + + + Shared Calendars + + + Shared Contacts + + + Shared Folders + + + Shared Notes + + + Shared Tasks + + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/SmarterMail100_EditDomain_Throttling.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/SmarterMail100_EditDomain_Throttling.ascx.resx new file mode 100644 index 00000000..2cb03b10 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/SmarterMail100_EditDomain_Throttling.ascx.resx @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Outgoing Bandwidth per Hour, MB: + + + Bounces Received per Hour: + + + Enabled + + + Outgoing Messages per Hour: + + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/SmarterMail100_EditForwarding.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/SmarterMail100_EditForwarding.ascx.resx new file mode 100644 index 00000000..85c90909 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/SmarterMail100_EditForwarding.ascx.resx @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/SmarterMail100_EditGroup.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/SmarterMail100_EditGroup.ascx.resx new file mode 100644 index 00000000..3917aca2 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/SmarterMail100_EditGroup.ascx.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Group E-Mails: + + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/SmarterMail100_EditList.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/SmarterMail100_EditList.ascx.resx new file mode 100644 index 00000000..e30d8641 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/SmarterMail100_EditList.ascx.resx @@ -0,0 +1,219 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Enabled + + + Reply To List + + + Enabled + + + Moderator should be within mail domain where Mail List is located + + + Anyone + + + Subscribers Only + + + Moderator Only + + + Password Protected Posting + + + List + + + Moderator + + + Sender + + + List Description: + + + List Options: + + + Max Message Size, KB: + + + Max Recipients per Message: + + + Mailing List Members: + + + Moderation is Enabled: + + + List Moderator: + + + Who Can Post: + + + List Password: + + + Subscribers Reply To: + + + Subject Prefix: + + + <Choose a moderator> + + + List Additional Options + + + Enable Unsubscribe from Subject: + + + Enable Digest Mode: + + + Enable LIST Command: + + + Enable SUBSCRIBE Command: + + + List From Address: + + + List Reply To Address: + + + List To Address: + + + Send Subscribe Email: + + + Send Unsubscribe Email: + + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/SmarterMail100_Settings.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/SmarterMail100_Settings.ascx.resx new file mode 100644 index 00000000..cd341590 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/SmarterMail100_Settings.ascx.resx @@ -0,0 +1,150 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Enable Domain Administrators + + + Import Domain Admin + + + Import System Admin + + + Inherit Domain Default Limits &nbsp; (Domain Default Limits will be applied for all new created domains) + + + Admin Login: + + + Admin Password: + + + Current Admin Password: + + + Domains Root Folder: + + + Public IP Address: + + + SmarterMail Web Services URL: + + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditAccount.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditAccount.ascx new file mode 100644 index 00000000..1966a18c --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditAccount.ascx @@ -0,0 +1,114 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SmarterMail100_EditAccount.ascx.cs" Inherits="WebsitePanel.Portal.ProviderControls.SmarterMail100_EditAccount" %> +<%@ Register TagPrefix="wsp" TagName="CollapsiblePanel" Src="../UserControls/CollapsiblePanel.ascx" %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + +
+ + +
+ + + +
+ + + +
+ + +
+ + +
+ + + + + + + + + + + + + + + + + + + +
+ + +
+ + +
+ + +
+
+ + + + + + + + + + + + +
+ + +
+ + +
+
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditAccount.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditAccount.ascx.cs new file mode 100644 index 00000000..d7a24d8c --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditAccount.ascx.cs @@ -0,0 +1,75 @@ +// Copyright (c) 2015, 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 WebsitePanel.Providers.Mail; + +namespace WebsitePanel.Portal.ProviderControls +{ + public partial class SmarterMail100_EditAccount : WebsitePanelControlBase, IMailEditAccountControl + { + protected void Page_Load(object sender, EventArgs e) + { + + passwordRow.Visible = (PanelRequest.ItemID > 0); + } + + public void BindItem(MailAccount item) + { + txtFirstName.Text = item.FirstName; + txtLastName.Text = item.LastName; + txtSignature.Text = item.Signature; + cbEnableAccount.Checked = item.Enabled; + chkResponderEnabled.Checked = item.ResponderEnabled; + txtReplyTo.Text = item.ReplyTo; + txtSubject.Text = item.ResponderSubject; + txtMessage.Text = item.ResponderMessage; + txtForward.Text = item.ForwardingAddresses != null ? String.Join("; ", item.ForwardingAddresses) : ""; + chkDeleteOnForward.Checked = item.DeleteOnForward; + cbDomainAdmin.Visible = item.IsDomainAdminEnabled; + cbDomainAdmin.Checked = item.IsDomainAdmin; + } + + public void SaveItem(MailAccount item) + { + item.FirstName = txtFirstName.Text; + item.LastName = txtLastName.Text; + item.Signature = txtSignature.Text; + item.ResponderEnabled = chkResponderEnabled.Checked; + item.Enabled = cbEnableAccount.Checked; + item.ReplyTo = txtReplyTo.Text; + item.ResponderSubject = txtSubject.Text; + item.ResponderMessage = txtMessage.Text; + item.ForwardingAddresses = Utils.ParseDelimitedString(txtForward.Text, ';', ' ', ','); + item.DeleteOnForward = chkDeleteOnForward.Checked; + item.ChangePassword = cbChangePassword.Checked; + item.ChangePassword = cbChangePassword.Checked; + item.IsDomainAdmin = cbDomainAdmin.Checked; + } + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditAccount.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditAccount.ascx.designer.cs new file mode 100644 index 00000000..cc322029 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditAccount.ascx.designer.cs @@ -0,0 +1,240 @@ +//------------------------------------------------------------------------------ +// +// 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.ProviderControls { + + + public partial class SmarterMail100_EditAccount { + + /// + /// passwordRow control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlTableRow passwordRow; + + /// + /// cbChangePassword control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbChangePassword; + + /// + /// cbEnableAccount control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbEnableAccount; + + /// + /// cbDomainAdmin control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbDomainAdmin; + + /// + /// lblFirstName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblFirstName; + + /// + /// 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; + + /// + /// lblLastName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblLastName; + + /// + /// 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; + + /// + /// lblReplyTo control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblReplyTo; + + /// + /// txtReplyTo control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtReplyTo; + + /// + /// lblSignature control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblSignature; + + /// + /// txtSignature control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtSignature; + + /// + /// secAutoresponder control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.CollapsiblePanel secAutoresponder; + + /// + /// AutoresponderPanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel AutoresponderPanel; + + /// + /// lblResponderEnabled control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblResponderEnabled; + + /// + /// chkResponderEnabled control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox chkResponderEnabled; + + /// + /// lblSubject control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblSubject; + + /// + /// txtSubject control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtSubject; + + /// + /// lblMessage control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblMessage; + + /// + /// txtMessage control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtMessage; + + /// + /// secForwarding control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.CollapsiblePanel secForwarding; + + /// + /// ForwardingPanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel ForwardingPanel; + + /// + /// lblForwardTo control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblForwardTo; + + /// + /// txtForward control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtForward; + + /// + /// chkDeleteOnForward control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox chkDeleteOnForward; + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditDomain.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditDomain.ascx new file mode 100644 index 00000000..9babfd25 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditDomain.ascx @@ -0,0 +1,145 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SmarterMail100_EditDomain.ascx.cs" Inherits="WebsitePanel.Portal.ProviderControls.SmarterMail100_EditDomain" %> +<%@ Register Src="SmarterMail60_EditDomain_Features.ascx" TagName="SmarterMail60_EditDomain_Features" + TagPrefix="uc4" %> +<%@ Register Src="SmarterMail60_EditDomain_Sharing.ascx" TagName="SmarterMail60_EditDomain_Sharing" + TagPrefix="uc3" %> +<%@ Register Src="SmarterMail60_EditDomain_Throttling.ascx" TagName="SmarterMail60_EditDomain_Throttling" + TagPrefix="uc5" %> + +<%@ Register Src="../UserControls/QuotaEditor.ascx" TagName="QuotaEditor" TagPrefix="uc1" %> +<%@ Register TagPrefix="wsp" TagName="CollapsiblePanel" Src="../UserControls/CollapsiblePanel.ascx" %> + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+
+ +
\ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditDomain.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditDomain.ascx.cs new file mode 100644 index 00000000..9785a4d4 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditDomain.ascx.cs @@ -0,0 +1,183 @@ +// Copyright (c) 2015, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Web.UI.WebControls; +using WebsitePanel.EnterpriseServer; +using WebsitePanel.Providers.Mail; + +namespace WebsitePanel.Portal.ProviderControls +{ + public partial class SmarterMail100_EditDomain : WebsitePanelControlBase, IMailEditDomainControl + { + protected void Page_Load(object sender, EventArgs e) + { + PackageInfo info = ES.Services.Packages.GetPackage(PanelSecurity.PackageId); + + AdvancedSettingsPanel.Visible = PanelSecurity.EffectiveUser.Role == UserRole.Administrator; + InitValidators(); + } + + public void BindItem(MailDomain item) + { + BindMailboxes(item); + BindQuotas(item); + + featuresSection.BindItem(item); + sharingSection.BindItem(item); + throttlingSection.BindItem(item); + + + if (item[MailDomain.SMARTERMAIL_LICENSE_TYPE] == "PRO") + { + secSharing.Visible = false; + sharingSection.Visible = false; + secThrottling.Visible = false; + throttlingSection.Visible = false; + } + else + { + sharingSection.BindItem(item); + throttlingSection.BindItem(item); + } + + } + + public void SaveItem(MailDomain item) + { + item.CatchAllAccount = ddlCatchAllAccount.SelectedValue; + SaveQuotas(item); + + featuresSection.SaveItem(item); + sharingSection.SaveItem(item); + throttlingSection.SaveItem(item); + + + if (item[MailDomain.SMARTERMAIL_LICENSE_TYPE] == "PRO") + { + secSharing.Visible = false; + sharingSection.Visible = false; + secThrottling.Visible = false; + throttlingSection.Visible = false; + } + else + { + sharingSection.SaveItem(item); + throttlingSection.SaveItem(item); + } + } + + private void SaveQuotas(MailDomain item) + { + item.MaxDomainSizeInMB = Utils.ParseInt(txtSize.Text); + item.MaxDomainAliases = Utils.ParseInt(txtDomainAliases.Text); + item.MaxDomainUsers = Utils.ParseInt(txtUser.Text); + item.MaxAliases = Utils.ParseInt(txtUserAliases.Text); + item.MaxLists = Utils.ParseInt(txtMailingLists.Text); + item[MailDomain.SMARTERMAIL5_POP_RETREIVAL_ACCOUNTS] = txtPopRetreivalAccounts.Text; + item.MaxRecipients = Utils.ParseInt(txtRecipientsPerMessage.Text); + item.MaxMessageSize = Utils.ParseInt(txtMessageSize.Text); + } + + private void BindQuotas(MailDomain item) + { + txtSize.Text = item.MaxDomainSizeInMB.ToString(); + txtDomainAliases.Text = item.MaxDomainAliases.ToString(); + txtUser.Text = item.MaxDomainUsers.ToString(); + txtUserAliases.Text = item.MaxAliases.ToString(); + txtMailingLists.Text = item.MaxLists.ToString(); + txtPopRetreivalAccounts.Text = item[MailDomain.SMARTERMAIL5_POP_RETREIVAL_ACCOUNTS]; + txtRecipientsPerMessage.Text = item.MaxRecipients.ToString(); + txtMessageSize.Text = item.MaxMessageSize.ToString(); + } + + private void BindMailboxes(MailDomain item) + { + MailAccount[] accounts = ES.Services.MailServers.GetMailAccounts(item.PackageId, false); + MailAlias[] forwardings = ES.Services.MailServers.GetMailForwardings(item.PackageId, false); + + BindAccounts(item, ddlCatchAllAccount, accounts); + BindAccounts(item, ddlCatchAllAccount, forwardings); + Utils.SelectListItem(ddlCatchAllAccount, item.CatchAllAccount); + + } + + private void BindAccounts(MailDomain item, DropDownList ddl, MailAccount[] accounts) + { + if (ddl.Items.Count == 0) + ddl.Items.Add(new ListItem(GetLocalizedString("Text.NotSelected"), "")); + + foreach (MailAccount account in accounts) + { + int idx = account.Name.IndexOf("@"); + string accountName = account.Name.Substring(0, idx); + string accountDomain = account.Name.Substring(idx + 1); + + if (String.Compare(accountDomain, item.Name, true) == 0) + ddl.Items.Add(new ListItem(account.Name, accountName)); + } + } + + private void InitValidators() + { + string message = "*"; + reqValRecipientsPerMessage.ErrorMessage = message; + valRecipientsPerMessage.ErrorMessage = message; + valRecipientsPerMessage.MaximumValue = int.MaxValue.ToString(); + + reqValMessageSize.ErrorMessage = message; + valMessageSize.ErrorMessage = message; + valMessageSize.MaximumValue = int.MaxValue.ToString(); + + reqValMailingLists.ErrorMessage = message; + valMailingLists.ErrorMessage = message; + valMailingLists.MaximumValue = int.MaxValue.ToString(); + + reqPopRetreivalAccounts.ErrorMessage = message; + valPopRetreivalAccounts.ErrorMessage = message; + valPopRetreivalAccounts.MaximumValue = int.MaxValue.ToString(); + + reqValUser.ErrorMessage = message; + valUser.ErrorMessage = message; + valUser.MaximumValue = int.MaxValue.ToString(); + + reqValUserAliases.ErrorMessage = message; + valUserAliases.ErrorMessage = message; + valUserAliases.MaximumValue = int.MaxValue.ToString(); + + reqValDomainAliases.ErrorMessage = message; + valDomainAliases.ErrorMessage = message; + valDomainAliases.MaximumValue = int.MaxValue.ToString(); + + reqValDiskSpace.ErrorMessage = message; + valDomainDiskSpace.ErrorMessage = message; + valDomainDiskSpace.MaximumValue = int.MaxValue.ToString(); + + } + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditDomain.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditDomain.ascx.designer.cs new file mode 100644 index 00000000..578763c7 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditDomain.ascx.designer.cs @@ -0,0 +1,429 @@ +//------------------------------------------------------------------------------ +// +// 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.ProviderControls { + + + public partial class SmarterMail100_EditDomain { + + /// + /// lblCatchAll control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblCatchAll; + + /// + /// ddlCatchAllAccount control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList ddlCatchAllAccount; + + /// + /// AdvancedSettingsPanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel AdvancedSettingsPanel; + + /// + /// secFeatures control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.CollapsiblePanel secFeatures; + + /// + /// FeaturesPanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel FeaturesPanel; + + /// + /// featuresSection control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.ProviderControls.SmarterMail60_EditDomain_Features featuresSection; + + /// + /// secSharing control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.CollapsiblePanel secSharing; + + /// + /// SharingPanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel SharingPanel; + + /// + /// sharingSection control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.ProviderControls.SmarterMail60_EditDomain_Sharing sharingSection; + + /// + /// secThrottling control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.CollapsiblePanel secThrottling; + + /// + /// ThrottlingPanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel ThrottlingPanel; + + /// + /// throttlingSection control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.ProviderControls.SmarterMail60_EditDomain_Throttling throttlingSection; + + /// + /// secLimits control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.CollapsiblePanel secLimits; + + /// + /// LimitsPanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel LimitsPanel; + + /// + /// lblDomainDiskSpace control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblDomainDiskSpace; + + /// + /// txtSize control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtSize; + + /// + /// valDomainDiskSpace control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.RangeValidator valDomainDiskSpace; + + /// + /// reqValDiskSpace control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.RequiredFieldValidator reqValDiskSpace; + + /// + /// lblDomainAliases control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblDomainAliases; + + /// + /// txtDomainAliases control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtDomainAliases; + + /// + /// valDomainAliases control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.RangeValidator valDomainAliases; + + /// + /// reqValDomainAliases control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.RequiredFieldValidator reqValDomainAliases; + + /// + /// lblUserQuota control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblUserQuota; + + /// + /// txtUser control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtUser; + + /// + /// valUser control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.RangeValidator valUser; + + /// + /// reqValUser control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.RequiredFieldValidator reqValUser; + + /// + /// lblUserAliasesQuota control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblUserAliasesQuota; + + /// + /// txtUserAliases control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtUserAliases; + + /// + /// valUserAliases control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.RangeValidator valUserAliases; + + /// + /// reqValUserAliases control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.RequiredFieldValidator reqValUserAliases; + + /// + /// lblMailingListsQuota control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblMailingListsQuota; + + /// + /// txtMailingLists control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtMailingLists; + + /// + /// valMailingLists control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.RangeValidator valMailingLists; + + /// + /// reqValMailingLists control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.RequiredFieldValidator reqValMailingLists; + + /// + /// lblPopRetreivalAccounts control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblPopRetreivalAccounts; + + /// + /// txtPopRetreivalAccounts control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtPopRetreivalAccounts; + + /// + /// valPopRetreivalAccounts control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.RangeValidator valPopRetreivalAccounts; + + /// + /// reqPopRetreivalAccounts control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.RequiredFieldValidator reqPopRetreivalAccounts; + + /// + /// lblMessageSizeQuota control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblMessageSizeQuota; + + /// + /// txtMessageSize control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtMessageSize; + + /// + /// valMessageSize control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.RangeValidator valMessageSize; + + /// + /// reqValMessageSize control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.RequiredFieldValidator reqValMessageSize; + + /// + /// lblRecipientsPerMessageQuota control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblRecipientsPerMessageQuota; + + /// + /// txtRecipientsPerMessage control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtRecipientsPerMessage; + + /// + /// valRecipientsPerMessage control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.RangeValidator valRecipientsPerMessage; + + /// + /// reqValRecipientsPerMessage control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.RequiredFieldValidator reqValRecipientsPerMessage; + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditDomain_Features.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditDomain_Features.ascx new file mode 100644 index 00000000..585a6e76 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditDomain_Features.ascx @@ -0,0 +1,69 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SmarterMail100_EditDomain_Features.ascx.cs" Inherits="WebsitePanel.Portal.ProviderControls.SmarterMail100_EditDomain_Features" %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
\ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditDomain_Features.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditDomain_Features.ascx.cs new file mode 100644 index 00000000..8f2568b5 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditDomain_Features.ascx.cs @@ -0,0 +1,71 @@ +// Copyright (c) 2015, 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 WebsitePanel.Providers.Mail; + +namespace WebsitePanel.Portal.ProviderControls +{ + public partial class SmarterMail100_EditDomain_Features : WebsitePanelControlBase + { + protected void Page_Load(object sender, EventArgs e) + { + + } + + public void SaveItem(MailDomain item) + { + item.ShowContentFilteringMenu = cbShowcontentfilteringmenu.Checked; + item.ShowDomainAliasMenu = cbShowdomainaliasmenu.Checked; + item.ShowListMenu = cbShowlistmenu.Checked; + item.ShowSpamMenu = cbShowspammenu.Checked; + item[MailDomain.SMARTERMAIL5_SHOW_DOMAIN_REPORTS] = cbShowDomainReports.Checked.ToString(); + item[MailDomain.SMARTERMAIL5_POP_RETREIVAL_ENABLED] = cbEnablePopRetreival.Checked.ToString(); + item[MailDomain.SMARTERMAIL5_CATCHALLS_ENABLED] = cbEnableCatchAlls.Checked.ToString(); + item[MailDomain.SMARTERMAIL6_IMAP_RETREIVAL_ENABLED] = cbEnableIMAPRetreival.ToString(); + item[MailDomain.SMARTERMAIL6_MAIL_SIGNING_ENABLED] = cbEnableEmailSigning.ToString(); + item[MailDomain.SMARTERMAIL6_EMAIL_REPORTS_ENABLED] = cbEnableEmailReports.ToString(); + item[MailDomain.SMARTERMAIL6_SYNCML_ENABLED] = cbEnableSyncML.ToString(); + } + + public void BindItem(MailDomain item) + { + cbShowcontentfilteringmenu.Checked = item.ShowContentFilteringMenu; + cbShowdomainaliasmenu.Checked = item.ShowDomainAliasMenu; + cbShowlistmenu.Checked = item.ShowListMenu; + cbShowspammenu.Checked = item.ShowSpamMenu; + cbShowDomainReports.Checked = Convert.ToBoolean(item[MailDomain.SMARTERMAIL5_SHOW_DOMAIN_REPORTS]); + cbEnablePopRetreival.Checked = Convert.ToBoolean(item[MailDomain.SMARTERMAIL5_POP_RETREIVAL_ENABLED]); + cbEnableCatchAlls.Checked = Convert.ToBoolean(item[MailDomain.SMARTERMAIL5_CATCHALLS_ENABLED]); + cbEnableIMAPRetreival.Checked = Convert.ToBoolean(item[MailDomain.SMARTERMAIL6_IMAP_RETREIVAL_ENABLED]); + cbEnableEmailSigning.Checked = Convert.ToBoolean(item[MailDomain.SMARTERMAIL6_MAIL_SIGNING_ENABLED]); + cbEnableEmailReports.Checked = Convert.ToBoolean((item[MailDomain.SMARTERMAIL6_EMAIL_REPORTS_ENABLED])); + cbEnableSyncML.Checked = Convert.ToBoolean(item[MailDomain.SMARTERMAIL6_SYNCML_ENABLED]); + } + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditDomain_Features.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditDomain_Features.ascx.designer.cs new file mode 100644 index 00000000..861661d5 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditDomain_Features.ascx.designer.cs @@ -0,0 +1,213 @@ +//------------------------------------------------------------------------------ +// +// 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.ProviderControls { + + + public partial class SmarterMail100_EditDomain_Features { + + /// + /// Label1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label Label1; + + /// + /// cbShowcontentfilteringmenu control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbShowcontentfilteringmenu; + + /// + /// Label2 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label Label2; + + /// + /// cbShowdomainaliasmenu control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbShowdomainaliasmenu; + + /// + /// Label3 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label Label3; + + /// + /// cbShowlistmenu control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbShowlistmenu; + + /// + /// Label4 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label Label4; + + /// + /// cbShowspammenu control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbShowspammenu; + + /// + /// Label5 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label Label5; + + /// + /// cbShowDomainReports control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbShowDomainReports; + + /// + /// Label6 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label Label6; + + /// + /// cbEnablePopRetreival control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbEnablePopRetreival; + + /// + /// Label7 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label Label7; + + /// + /// cbEnableCatchAlls control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbEnableCatchAlls; + + /// + /// Label8 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label Label8; + + /// + /// cbEnableIMAPRetreival control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbEnableIMAPRetreival; + + /// + /// Label9 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label Label9; + + /// + /// cbEnableEmailSigning control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbEnableEmailSigning; + + /// + /// Label10 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label Label10; + + /// + /// cbEnableEmailReports control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbEnableEmailReports; + + /// + /// Label11 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label Label11; + + /// + /// cbEnableSyncML control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbEnableSyncML; + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditDomain_Sharing.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditDomain_Sharing.ascx new file mode 100644 index 00000000..dddb57dd --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditDomain_Sharing.ascx @@ -0,0 +1,27 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SmarterMail100_EditDomain_Sharing.ascx.cs" Inherits="WebsitePanel.Portal.ProviderControls.SmarterMail100_EditDomain_Sharing" %> + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditDomain_Sharing.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditDomain_Sharing.ascx.cs new file mode 100644 index 00000000..2f8d264e --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditDomain_Sharing.ascx.cs @@ -0,0 +1,63 @@ +// Copyright (c) 2015, 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 WebsitePanel.Providers.Mail; + +namespace WebsitePanel.Portal.ProviderControls +{ + public partial class SmarterMail100_EditDomain_Sharing : WebsitePanelControlBase + { + protected void Page_Load(object sender, EventArgs e) + { + + } + + public void SaveItem(MailDomain item) + { + item.IsGlobalAddressList = cbGlobalAddressList.Checked; + item.SharedCalendars = cbSharedCalendars.Checked; + item.SharedContacts = cbSharedContacts.Checked; + item.SharedFolders = cbSharedFolders.Checked; + item.SharedNotes = cbSharedNotes.Checked; + item.SharedTasks = cbSharedTasks.Checked; + + } + + public void BindItem(MailDomain item) + { + cbGlobalAddressList.Checked = item.IsGlobalAddressList; + cbSharedCalendars.Checked = item.SharedCalendars; + cbSharedContacts.Checked = item.SharedContacts; + cbSharedFolders.Checked = item.SharedFolders; + cbSharedNotes.Checked = item.SharedNotes; + cbSharedTasks.Checked = item.SharedTasks; + } + + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditDomain_Sharing.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditDomain_Sharing.ascx.designer.cs new file mode 100644 index 00000000..3e9b9181 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditDomain_Sharing.ascx.designer.cs @@ -0,0 +1,123 @@ +//------------------------------------------------------------------------------ +// +// 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.ProviderControls { + + + public partial class SmarterMail100_EditDomain_Sharing { + + /// + /// Label1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label Label1; + + /// + /// cbGlobalAddressList control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbGlobalAddressList; + + /// + /// Label2 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label Label2; + + /// + /// cbSharedCalendars control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbSharedCalendars; + + /// + /// Label3 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label Label3; + + /// + /// cbSharedContacts control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbSharedContacts; + + /// + /// Label4 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label Label4; + + /// + /// cbSharedFolders control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbSharedFolders; + + /// + /// Label5 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label Label5; + + /// + /// cbSharedNotes control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbSharedNotes; + + /// + /// Label6 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label Label6; + + /// + /// cbSharedTasks control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbSharedTasks; + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditDomain_Throttling.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditDomain_Throttling.ascx new file mode 100644 index 00000000..9aecdd4e --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditDomain_Throttling.ascx @@ -0,0 +1,45 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SmarterMail100_EditDomain_Throttling.ascx.cs" Inherits="WebsitePanel.Portal.ProviderControls.SmarterMail100_EditDomain_Throttling" %> + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ + + + + +
+ + + + + +
\ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditDomain_Throttling.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditDomain_Throttling.ascx.cs new file mode 100644 index 00000000..5033c54c --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditDomain_Throttling.ascx.cs @@ -0,0 +1,79 @@ +// Copyright (c) 2015, 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 WebsitePanel.Providers.Mail; + +namespace WebsitePanel.Portal.ProviderControls +{ + public partial class SmarterMail100_EditDomain_Throttling : WebsitePanelControlBase + { + protected void Page_Load(object sender, EventArgs e) + { + InitValidators(); + } + + public void SaveItem(MailDomain item) + { + item[MailDomain.SMARTERMAIL5_MESSAGES_PER_HOUR] = txtMessagesPerHour.Text; + item[MailDomain.SMARTERMAIL5_MESSAGES_PER_HOUR_ENABLED] = cbMessagesPerHour.Checked.ToString(); + item[MailDomain.SMARTERMAIL5_BANDWIDTH_PER_HOUR] = txtBandwidthPerHour.Text; + item[MailDomain.SMARTERMAIL5_BANDWIDTH_PER_HOUR_ENABLED] = cbBandwidthPerHour.Checked.ToString(); + item[MailDomain.SMARTERMAIL5_BOUNCES_PER_HOUR] = txtBouncesPerHour.Text; + item[MailDomain.SMARTERMAIL5_BOUNCES_PER_HOUR_ENABLED] = cbBouncesPerHour.Checked.ToString(); + } + + public void BindItem(MailDomain item) + { + txtMessagesPerHour.Text = item[MailDomain.SMARTERMAIL5_MESSAGES_PER_HOUR]; + cbMessagesPerHour.Checked = Convert.ToBoolean(item[MailDomain.SMARTERMAIL5_MESSAGES_PER_HOUR_ENABLED]); + txtBandwidthPerHour.Text = item[MailDomain.SMARTERMAIL5_BANDWIDTH_PER_HOUR]; + cbBandwidthPerHour.Checked = Convert.ToBoolean(item[MailDomain.SMARTERMAIL5_BANDWIDTH_PER_HOUR_ENABLED]); + txtBouncesPerHour.Text = item[MailDomain.SMARTERMAIL5_BOUNCES_PER_HOUR]; + cbBouncesPerHour.Checked = Convert.ToBoolean(item[MailDomain.SMARTERMAIL5_BOUNCES_PER_HOUR_ENABLED]); + } + + public void InitValidators() + { + string message = "*"; + + reqValMessagesPerHour.ErrorMessage = message; + valMessagesPerHour.ErrorMessage = message; + valMessagesPerHour.MaximumValue = int.MaxValue.ToString(); + + reqValBandwidth.ErrorMessage = message; + valBandwidthPerHour.ErrorMessage = message; + valBandwidthPerHour.MaximumValue = int.MaxValue.ToString(); + + reqValBouncesPerHour.ErrorMessage = message; + valBouncesPerHour.ErrorMessage = message; + valBouncesPerHour.MaximumValue = int.MaxValue.ToString(); + } + } + +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditDomain_Throttling.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditDomain_Throttling.ascx.designer.cs new file mode 100644 index 00000000..66a265b4 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditDomain_Throttling.ascx.designer.cs @@ -0,0 +1,177 @@ +//------------------------------------------------------------------------------ +// +// 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.ProviderControls { + + + public partial class SmarterMail100_EditDomain_Throttling { + + /// + /// lbMessagesPerHour control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lbMessagesPerHour; + + /// + /// txtMessagesPerHour control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtMessagesPerHour; + + /// + /// valMessagesPerHour control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.RangeValidator valMessagesPerHour; + + /// + /// reqValMessagesPerHour control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.RequiredFieldValidator reqValMessagesPerHour; + + /// + /// cbMessagesPerHour control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbMessagesPerHour; + + /// + /// lbMessagesPerHourEnabled control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lbMessagesPerHourEnabled; + + /// + /// lbBandwidthPerHour control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lbBandwidthPerHour; + + /// + /// txtBandwidthPerHour control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtBandwidthPerHour; + + /// + /// valBandwidthPerHour control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.RangeValidator valBandwidthPerHour; + + /// + /// reqValBandwidth control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.RequiredFieldValidator reqValBandwidth; + + /// + /// cbBandwidthPerHour control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbBandwidthPerHour; + + /// + /// lbBandwidthPerHourEnabled control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lbBandwidthPerHourEnabled; + + /// + /// lbBouncesPerHour control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lbBouncesPerHour; + + /// + /// txtBouncesPerHour control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtBouncesPerHour; + + /// + /// valBouncesPerHour control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.RangeValidator valBouncesPerHour; + + /// + /// reqValBouncesPerHour control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.RequiredFieldValidator reqValBouncesPerHour; + + /// + /// cbBouncesPerHour control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbBouncesPerHour; + + /// + /// lbBouncesPerHourEnabled control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lbBouncesPerHourEnabled; + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditForwarding .ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditForwarding .ascx new file mode 100644 index 00000000..b54ae91c --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditForwarding .ascx @@ -0,0 +1 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SmarterMail100_EditForwarding .ascx.cs" Inherits="WebsitePanel.Portal.ProviderControls.SmarterMail100_EditForwarding" %> diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditForwarding .ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditForwarding .ascx.cs new file mode 100644 index 00000000..588806a3 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditForwarding .ascx.cs @@ -0,0 +1,51 @@ +// Copyright (c) 2015, 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 WebsitePanel.Providers.Mail; + +namespace WebsitePanel.Portal.ProviderControls +{ + public partial class SmarterMail100_EditForwarding : WebsitePanelControlBase, IMailEditForwardingControl + { + protected void Page_Load(object sender, EventArgs e) + { + + } + + public void BindItem(MailAlias item) + { + + } + + public void SaveItem(MailAlias item) + { + + } + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditForwarding .ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditForwarding .ascx.designer.cs new file mode 100644 index 00000000..4bcf67d7 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditForwarding .ascx.designer.cs @@ -0,0 +1,15 @@ +//------------------------------------------------------------------------------ +// +// 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.ProviderControls { + + + public partial class SmarterMail100_EditForwarding { + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditGroup.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditGroup.ascx new file mode 100644 index 00000000..48de1ba3 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditGroup.ascx @@ -0,0 +1,12 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SmarterMail100_EditGroup.ascx.cs" Inherits="WebsitePanel.Portal.ProviderControls.SmarterMail100_EditGroup" %> +<%@ Register TagPrefix="dnc" TagName="EditItemsList" Src="../MailEditItems.ascx" %> + + + + + +
+ + + +
\ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditGroup.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditGroup.ascx.cs new file mode 100644 index 00000000..9ddba9ed --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditGroup.ascx.cs @@ -0,0 +1,51 @@ +// Copyright (c) 2015, 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 WebsitePanel.Providers.Mail; + +namespace WebsitePanel.Portal.ProviderControls +{ + public partial class SmarterMail100_EditGroup : WebsitePanelControlBase, IMailEditGroupControl + { + protected void Page_Load(object sender, EventArgs e) + { + } + + public void BindItem(MailGroup item) + { + mailEditItems.Items = item.Members; + } + + public void SaveItem(MailGroup item) + { + item.Members = mailEditItems.Items; + } + } + +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditGroup.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditGroup.ascx.designer.cs new file mode 100644 index 00000000..254eff80 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditGroup.ascx.designer.cs @@ -0,0 +1,33 @@ +//------------------------------------------------------------------------------ +// +// 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.ProviderControls { + + + public partial class SmarterMail100_EditGroup { + + /// + /// lblGroupMembers control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblGroupMembers; + + /// + /// mailEditItems control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.MailEditItems mailEditItems; + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditList.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditList.ascx new file mode 100644 index 00000000..a106e5bc --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditList.ascx @@ -0,0 +1,175 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SmarterMail100_EditList.ascx.cs" Inherits="WebsitePanel.Portal.ProviderControls.SmarterMail100_EditList" %> +<%@ Register TagPrefix="dnc" TagName="EditItemsList" Src="../MailEditItems.ascx" %> +<%@ Register TagPrefix="wsp" Namespace="WebsitePanel.WebPortal.Code.Controls" Assembly="WebsitePanel.WebPortal" %> +<%@ Register TagPrefix="wsp" TagName="CollapsiblePanel" Src="../UserControls/CollapsiblePanel.ascx" %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + + + + +
+ + + + +
+ + + + Anyone + MembersOnly + ModeratorOnly + +
+ + + + +
+ + + 0 +
+ + + 10 +
 
+ + +
+ + + + Default + List Address + Subscriber Address + +
+ + + + List Address + Poster Address + +
+ + + + List Address + Poster Address + +
 
+ + + +
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ +
+ +
+ +
+ +
+
\ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditList.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditList.ascx.cs new file mode 100644 index 00000000..1c2f48b0 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditList.ascx.cs @@ -0,0 +1,210 @@ +// Copyright (c) 2015, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Web.UI.WebControls; +using WebsitePanel.Providers.Mail; +using WebsitePanel.WebPortal.Code.Controls; + +namespace WebsitePanel.Portal.ProviderControls +{ + public partial class SmarterMail100_EditList : WebsitePanelControlBase, IMailEditListControl + { + private string selectedModerator = null; + private string selectedListToAddress = null; + private string selectedListFromAddress = null; + private string selectedListReplyToAddress = null; + private string itemName = null; + private MailEditAddress ctrl = null; + + protected void Page_Load(object sender, EventArgs e) + { + txtPassword.Attributes["value"] = txtPassword.Text; + BindListModerators(); + } + + public void BindItem(MailList item) + { + itemName = item.Name; + txtDescription.Text = item.Description; + if (String.IsNullOrEmpty(item.ModeratorAddress)) + { + Utils.SelectListItem(ddlListModerators, GetLocalizedString("Text.SelectModerator")); + selectedModerator = GetLocalizedString("Text.SelectModerator"); + } + else + { + Utils.SelectListItem(ddlListModerators, item.ModeratorAddress); + selectedModerator = item.ModeratorAddress; + } + + chkReplyToList.Checked = (item.ReplyToMode == ReplyTo.RepliesToList); + Utils.SelectListItem(ddlPostingMode, item.PostingMode); + Utils.SelectListItem(ddlListToAddress, item.ListToAddress); + selectedListToAddress = item.ListToAddress; + Utils.SelectListItem(ddlListFromAddress, item.ListFromAddress); + selectedListFromAddress = item.ListFromAddress; + Utils.SelectListItem(ddlListReplyToAddress, item.ListReplyToAddress); + selectedListReplyToAddress = item.ListReplyToAddress; + txtPassword.Text = item.Password; + chkPasswordEnabled.Checked = item.RequirePassword; + cbDigestMode.Checked = item.DigestMode; + cbSendSubcsribe.Checked = item.SendSubscribe; + cbSendUnsubscribe.Checked = item.SendUnsubscribe; + cbAllowUnsubscribe.Checked = item.AllowUnsubscribe; + cbDisableListcommand.Checked = !item.DisableListcommand; + cbDisableSubscribecommand.Checked = !item.DisableSubscribecommand; + txtSubjectPrefix.Text = item.SubjectPrefix; + chkSubjectPrefixEnabled.Checked = item.EnableSubjectPrefix; + txtMaxMessageSize.Text = item.MaxMessageSize.ToString(); + txtMaxRecipients.Text = item.MaxRecipientsPerMessage.ToString(); + + // members + mailEditItems.Items = item.Members; + } + + public void SaveItem(MailList item) + { + item.Description = txtDescription.Text; + if (ddlListModerators.SelectedValue == GetLocalizedString("Text.SelectModerator")) + { + item.ModeratorAddress = null; + } + else + { + item.ModeratorAddress = ddlListModerators.SelectedValue; + } + + item.ReplyToMode = chkReplyToList.Checked ? ReplyTo.RepliesToList : ReplyTo.RepliesToSender; + item.PostingMode = (PostingMode)Enum.Parse(typeof(PostingMode), ddlPostingMode.SelectedValue, true); + item.ListToAddress = ddlListToAddress.SelectedValue; + item.ListFromAddress = ddlListFromAddress.SelectedValue; + item.ListReplyToAddress = ddlListReplyToAddress.SelectedValue; + item.Password = txtPassword.Text; + item.RequirePassword = chkPasswordEnabled.Checked; + item.SubjectPrefix = txtSubjectPrefix.Text; + item.EnableSubjectPrefix = chkSubjectPrefixEnabled.Checked; + item.DigestMode = cbDigestMode.Checked; + item.SendSubscribe = cbSendSubcsribe.Checked; + item.SendUnsubscribe = cbSendUnsubscribe.Checked; + item.AllowUnsubscribe = cbAllowUnsubscribe.Checked; + item.DisableListcommand = !cbDisableListcommand.Checked; + item.DisableSubscribecommand = !cbDisableSubscribecommand.Checked; + + item.MaxMessageSize = Int32.Parse(txtMaxMessageSize.Text); + item.MaxRecipientsPerMessage = Int32.Parse(txtMaxRecipients.Text); + item.Members = mailEditItems.Items; + ctrl = null; + } + + public void BindListModerators() + { + + string domainName = null; + if (!String.IsNullOrEmpty(itemName)) + { + domainName = GetDomainName(itemName); + + + MailAccount[] moderators = ES.Services.MailServers.GetMailAccounts(PanelSecurity.PackageId, true); + ddlListModerators.Items.Clear(); + ddlListModerators.Items.Insert(0, new ListItem(GetLocalizedString("Text.SelectModerator"), "")); + + if (moderators != null) + foreach (MailAccount account in moderators) + { + if (GetDomainName(account.Name) == domainName) + { + if (ddlListModerators != null) + { + ddlListModerators.Items.Add(new ListItem(account.Name)); + ddlListToAddress.Items.Add(new ListItem(account.Name)); + ddlListFromAddress.Items.Add(new ListItem(account.Name)); + ddlListReplyToAddress.Items.Add(new ListItem(account.Name)); + } + } + } + + Utils.SelectListItem(ddlListModerators, selectedModerator); + Utils.SelectListItem(ddlListToAddress, selectedListToAddress); + Utils.SelectListItem(ddlListFromAddress, selectedListFromAddress); + Utils.SelectListItem(ddlListReplyToAddress, selectedListReplyToAddress); + + } + else + { + + MailAccount[] moderators = ES.Services.MailServers.GetMailAccounts(PanelSecurity.PackageId, true); + ddlListModerators.Items.Clear(); + ddlListModerators.Items.Insert(0, new ListItem(GetLocalizedString("Text.SelectModerator"), "")); + + if (moderators != null) + foreach (MailAccount account in moderators) + { + if (ddlListModerators != null) + { + ddlListModerators.Items.Add(new ListItem(account.Name)); + ddlListToAddress.Items.Add(new ListItem(account.Name)); + ddlListFromAddress.Items.Add(new ListItem(account.Name)); + ddlListReplyToAddress.Items.Add(new ListItem(account.Name)); + } + } + + Utils.SelectListItem(ddlListModerators, selectedModerator); + Utils.SelectListItem(ddlListToAddress, selectedListToAddress); + Utils.SelectListItem(ddlListFromAddress, selectedListFromAddress); + Utils.SelectListItem(ddlListReplyToAddress, selectedListReplyToAddress); + } + } + + private string GetDomainName(string email) + { + return email.Substring(email.IndexOf("@") + 1); + } + + protected void ctxValDomain_EvaluatingContext(object sender, DesktopValidationEventArgs e) + { + if (Parent != null) ctrl = (MailEditAddress)Parent.Parent.FindControl("emailAddress"); + + string moderator = ddlListModerators.SelectedValue; + + if (ctrl != null) + { + if (String.Equals(GetDomainName(moderator), GetDomainName(ctrl.Email), StringComparison.InvariantCultureIgnoreCase)) + { + e.ContextIsValid = true; + return; + } + } + e.ContextIsValid = false; + } + + } + +} + diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditList.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditList.ascx.designer.cs new file mode 100644 index 00000000..d351c7aa --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_EditList.ascx.designer.cs @@ -0,0 +1,393 @@ +//------------------------------------------------------------------------------ +// +// 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.ProviderControls { + + + public partial class SmarterMail100_EditList { + + /// + /// lblDescription control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblDescription; + + /// + /// txtDescription control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtDescription; + + /// + /// lblModeratorAddress control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblModeratorAddress; + + /// + /// ddlListModerators control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList ddlListModerators; + + /// + /// reqValModerator control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.RequiredFieldValidator reqValModerator; + + /// + /// ctxValDomain control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.WebPortal.Code.Controls.DesktopContextValidator ctxValDomain; + + /// + /// lblPostingPassword control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblPostingPassword; + + /// + /// txtPassword control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtPassword; + + /// + /// chkPasswordEnabled control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox chkPasswordEnabled; + + /// + /// lblPostingMode control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblPostingMode; + + /// + /// ddlPostingMode control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList ddlPostingMode; + + /// + /// lblSubjectPrefix control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblSubjectPrefix; + + /// + /// txtSubjectPrefix control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtSubjectPrefix; + + /// + /// chkSubjectPrefixEnabled control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox chkSubjectPrefixEnabled; + + /// + /// lblMaxMessageSize control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblMaxMessageSize; + + /// + /// txtMaxMessageSize control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtMaxMessageSize; + + /// + /// lblMaxRecipients control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblMaxRecipients; + + /// + /// txtMaxRecipients control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtMaxRecipients; + + /// + /// lblListOptions control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblListOptions; + + /// + /// chkReplyToList control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox chkReplyToList; + + /// + /// lblListToAddress control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblListToAddress; + + /// + /// ddlListToAddress control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList ddlListToAddress; + + /// + /// lblListFromAddress control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblListFromAddress; + + /// + /// ddlListFromAddress control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList ddlListFromAddress; + + /// + /// lblListReplyToAddress control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblListReplyToAddress; + + /// + /// ddlListReplyToAddress control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList ddlListReplyToAddress; + + /// + /// lblMembers control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblMembers; + + /// + /// mailEditItems control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.MailEditItems mailEditItems; + + /// + /// AdditionalOptions control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.CollapsiblePanel AdditionalOptions; + + /// + /// pAdditionalOptions control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel pAdditionalOptions; + + /// + /// lbDigestMode control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lbDigestMode; + + /// + /// cbDigestMode control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbDigestMode; + + /// + /// lbSendSubscribe control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lbSendSubscribe; + + /// + /// cbSendSubcsribe control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbSendSubcsribe; + + /// + /// lbSendUnsubscribe control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lbSendUnsubscribe; + + /// + /// cbSendUnsubscribe control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbSendUnsubscribe; + + /// + /// lbAllowUnsubscribe control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lbAllowUnsubscribe; + + /// + /// cbAllowUnsubscribe control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbAllowUnsubscribe; + + /// + /// lbDisableListcommand control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lbDisableListcommand; + + /// + /// cbDisableListcommand control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbDisableListcommand; + + /// + /// lbDisableSubscribecommand control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lbDisableSubscribecommand; + + /// + /// cbDisableSubscribecommand control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbDisableSubscribecommand; + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_Settings.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_Settings.ascx new file mode 100644 index 00000000..26e07aa3 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_Settings.ascx @@ -0,0 +1,62 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SmarterMail100_Settings.ascx.cs" Inherits="WebsitePanel.Portal.ProviderControls.SmarterMail100_Settings" %> +<%@ Register Src="../UserControls/SelectIPAddress.ascx" TagName="SelectIPAddress" TagPrefix="uc1" %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + +
+ + + +
+ + ******* +
+ + + +
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_Settings.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_Settings.ascx.cs new file mode 100644 index 00000000..2153e0e6 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_Settings.ascx.cs @@ -0,0 +1,66 @@ +// Copyright (c) 2015, 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.Specialized; +using WebsitePanel.Providers.Common; + +namespace WebsitePanel.Portal.ProviderControls +{ + public partial class SmarterMail100_Settings : WebsitePanelControlBase, IHostingServiceProviderSettings + { + protected void Page_Load(object sender, EventArgs e) + { + } + + public void BindSettings(StringDictionary settings) + { + txtServiceUrl.Text = settings["ServiceUrl"]; + ipAddress.AddressValue = settings["ServerIPAddress"]; + txtDomainsFolder.Text = settings["DomainsPath"]; + txtUsername.Text = settings["AdminUsername"]; + ViewState["PWD"] = settings["AdminPassword"]; + rowPassword.Visible = ((string)ViewState["PWD"]) != ""; + cbImportDomainAdmin.Checked = Utils.ParseBool(settings[Constants.ImportDomainAdmin], false); + cbInheritDefaultLimits.Checked = Utils.ParseBool(settings[Constants.InheritDomainDefaultLimits], false); + cbEnableDomainAdmin.Checked = Utils.ParseBool(settings[Constants.EnableDomainAdministrators], false); + } + + public void SaveSettings(StringDictionary settings) + { + settings["ServiceUrl"] = txtServiceUrl.Text.Trim(); + settings["ServerIPAddress"] = ipAddress.AddressValue; + settings["DomainsPath"] = txtDomainsFolder.Text.Trim(); + settings["AdminUsername"] = txtUsername.Text.Trim(); + settings["AdminPassword"] = (txtPassword.Text.Length > 0) ? txtPassword.Text : (string)ViewState["PWD"]; + settings[Constants.ImportDomainAdmin] = cbImportDomainAdmin.Checked.ToString(); + settings[Constants.InheritDomainDefaultLimits] = cbInheritDefaultLimits.Checked.ToString(); + settings[Constants.EnableDomainAdministrators] = cbEnableDomainAdmin.Checked.ToString(); + } + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_Settings.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_Settings.ascx.designer.cs new file mode 100644 index 00000000..6a06b055 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail100_Settings.ascx.designer.cs @@ -0,0 +1,150 @@ +//------------------------------------------------------------------------------ +// +// 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.ProviderControls { + + + public partial class SmarterMail100_Settings { + + /// + /// lblServiceUrl control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblServiceUrl; + + /// + /// txtServiceUrl control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtServiceUrl; + + /// + /// lblPublicIP control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblPublicIP; + + /// + /// ipAddress control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.SelectIPAddress ipAddress; + + /// + /// lblDomainsPath control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblDomainsPath; + + /// + /// txtDomainsFolder control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtDomainsFolder; + + /// + /// lblAdminLogin control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblAdminLogin; + + /// + /// txtUsername control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtUsername; + + /// + /// rowPassword control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlTableRow rowPassword; + + /// + /// lblCurrPassword control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblCurrPassword; + + /// + /// lblAdminPassword control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblAdminPassword; + + /// + /// txtPassword control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtPassword; + + /// + /// cbImportDomainAdmin control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbImportDomainAdmin; + + /// + /// cbInheritDefaultLimits control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbInheritDefaultLimits; + + /// + /// cbEnableDomainAdmin control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbEnableDomainAdmin; + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/App_LocalResources/MailAccountActions.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/App_LocalResources/MailAccountActions.ascx.resx new file mode 100644 index 00000000..811bf894 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/App_LocalResources/MailAccountActions.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 + + + Apply + + + - Actions - + + + Disable + + + Enable + + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/MailAccountActions.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/MailAccountActions.ascx new file mode 100644 index 00000000..e71eb185 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/MailAccountActions.ascx @@ -0,0 +1,31 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MailAccountActions.ascx.cs" Inherits="WebsitePanel.Portal.MailAccountActions" %> + + + + + + + Actions + Disable + Enable + + + + + + + + + + diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/MailAccountActions.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/MailAccountActions.ascx.cs new file mode 100644 index 00000000..a8cef98f --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/MailAccountActions.ascx.cs @@ -0,0 +1,109 @@ +// Copyright (c) 2015, 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.Data; +using System.Configuration; +using System.Collections; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; +using Microsoft.Web.Services3.Referral; +using WebsitePanel.EnterpriseServer; +using WebsitePanel.EnterpriseServer.Base.HostedSolution; +using WebsitePanel.Portal.UserControls; +using WebsitePanel.Providers; +using WebsitePanel.Providers.HostedSolution; + +namespace WebsitePanel.Portal +{ + public enum MailAccountActionTypes + { + None = 0, + Disable = 1, + Enable = 2, + } + + public partial class MailAccountActions : ActionListControlBase + { + protected void Page_Load(object sender, EventArgs e) + { + + } + + protected override DropDownList ActionsList + { + get { return ddlMailAccountActions; } + } + + protected override int DoAction(List ids) + { + switch (SelectedAction) + { + case MailAccountActionTypes.Disable: + return ChangeMailAccountState(false, ids); + case MailAccountActionTypes.Enable: + return ChangeMailAccountState(true, ids); + } + + return 0; + } + + protected void btnApply_Click(object sender, EventArgs e) + { + switch (SelectedAction) + { + case MailAccountActionTypes.Disable: + case MailAccountActionTypes.Enable: + FireExecuteAction(); + break; + } + } + + private int ChangeMailAccountState(bool enable, List ids) + { + foreach (var id in ids) + { + var mailAccount = ES.Services.MailServers.GetMailAccount(id); + mailAccount.Enabled = enable; + int result = ES.Services.MailServers.UpdateMailAccount(mailAccount); + + if (result < 0) + return result; + } + + return 0; + } + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/MailAccountActions.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/MailAccountActions.ascx.designer.cs new file mode 100644 index 00000000..3c010fb4 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/MailAccountActions.ascx.designer.cs @@ -0,0 +1,42 @@ +//------------------------------------------------------------------------------ +// +// 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 { + + + public partial class MailAccountActions { + + /// + /// tblActions control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.UpdatePanel tblActions; + + /// + /// ddlMailAccountActions control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList ddlMailAccountActions; + + /// + /// btnApply control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button btnApply; + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/SpaceServiceItems.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/SpaceServiceItems.ascx index 939b7ce1..9eb453b3 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/SpaceServiceItems.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/SpaceServiceItems.ascx @@ -3,6 +3,7 @@ <%@ Register Src="ServerDetails.ascx" TagName="ServerDetails" TagPrefix="wsp" %> <%@ Register Src="SearchBox.ascx" TagName="SearchBox" TagPrefix="wsp" %> <%@ Register Src="WebsiteActions.ascx" TagName="WebsiteActions" TagPrefix="wsp" %> +<%@ Register Src="MailAccountActions.ascx" TagName="MailAccountActions" TagPrefix="wsp" %> @@ -21,8 +22,12 @@
+ <%-- Action lists --%>
+ <%-- Web Sites --%> + <%-- Mail Accounts --%> + diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/SpaceServiceItems.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/SpaceServiceItems.ascx.cs index 36b6e71f..c3914eee 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/SpaceServiceItems.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/SpaceServiceItems.ascx.cs @@ -113,14 +113,8 @@ namespace WebsitePanel.Portal.UserControls (PanelSecurity.SelectedUser.Role != UserRole.User) && chkRecursive.Checked; gvItems.Columns[5].Visible = (PanelSecurity.SelectedUser.Role == UserRole.Administrator); gvItems.Columns[6].Visible = (PanelSecurity.EffectiveUser.Role == UserRole.Administrator); - if (QuotaName == "Web.Sites") - { - websiteActions.Visible = true; - } - else - { - websiteActions.Visible = false; - } + + ShowActionList(); if (!IsPostBack) { @@ -215,5 +209,23 @@ namespace WebsitePanel.Portal.UserControls lnkView.Text = localizedLinkText != null ? localizedLinkText : ViewLinkText; } + private void ShowActionList() + { + websiteActions.Visible = false; + mailActions.Visible = false; + + switch (QuotaName) + { + case "Web.Sites": + websiteActions.Visible = true; + break; + case "Mail.Accounts": + ProviderInfo provider = ES.Services.Servers.GetPackageServiceProvider(PanelSecurity.PackageId, "Mail"); + if (provider.EditorControl == "SmarterMail100") + mailActions.Visible = true; + break; + } + } + } } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/SpaceServiceItems.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/SpaceServiceItems.ascx.designer.cs index 5dfd3221..a7593d19 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/SpaceServiceItems.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/SpaceServiceItems.ascx.designer.cs @@ -39,6 +39,15 @@ namespace WebsitePanel.Portal.UserControls { /// protected global::WebsitePanel.Portal.WebsiteActions websiteActions; + /// + /// mailActions control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.MailAccountActions mailActions; + /// /// searchBox control. /// 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 c47ed2bd..e5fa35b0 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj @@ -229,6 +229,69 @@ OrganizationDeletedUserGeneralSettings.ascx ASPXCodeBehind + + SmarterMail100_EditAccount.ascx + ASPXCodeBehind + + + SmarterMail100_EditAccount.ascx + + + SmarterMail100_EditDomain.ascx + ASPXCodeBehind + + + SmarterMail100_EditDomain.ascx + + + SmarterMail100_EditDomain_Features.ascx + ASPXCodeBehind + + + SmarterMail100_EditDomain_Features.ascx + + + SmarterMail100_EditDomain_Sharing.ascx + ASPXCodeBehind + + + SmarterMail100_EditDomain_Sharing.ascx + + + SmarterMail100_EditDomain_Throttling.ascx + ASPXCodeBehind + + + SmarterMail100_EditDomain_Throttling.ascx + + + SmarterMail100_EditForwarding .ascx + ASPXCodeBehind + + + SmarterMail100_EditForwarding .ascx + + + SmarterMail100_EditGroup.ascx + ASPXCodeBehind + + + SmarterMail100_EditGroup.ascx + + + SmarterMail100_EditList.ascx + ASPXCodeBehind + + + SmarterMail100_EditList.ascx + + + SmarterMail100_Settings.ascx + ASPXCodeBehind + + + SmarterMail100_Settings.ascx + Windows2012_Settings.ascx ASPXCodeBehind @@ -908,6 +971,13 @@ DomainActions.ascx + + MailAccountActions.ascx + ASPXCodeBehind + + + MailAccountActions.ascx + WebsiteActions.ascx ASPXCodeBehind @@ -4386,6 +4456,15 @@ + + + + + + + + + @@ -4393,6 +4472,33 @@ + + Designer + + + Designer + + + Designer + + + Designer + + + Designer + + + Designer + + + Designer + + + Designer + + + Designer + @@ -4507,6 +4613,7 @@ + @@ -4579,6 +4686,7 @@ + From 18ff39ce08769e7c48503d7820cefdb1309e2ca2 Mon Sep 17 00:00:00 2001 From: vfedosevich Date: Mon, 23 Feb 2015 00:41:38 -0800 Subject: [PATCH 08/13] RDS loca; admins fixes --- .../RemoteDesktopServicesProxy.cs | 32 +-- .../RemoteDesktopServicesController.cs | 31 ++- .../esRemoteDesktopServices.asmx.cs | 8 +- .../IRemoteDesktopServices.cs | 5 +- .../Windows2012.cs | 250 ++++++++++++------ .../RemoteDesktopServicesProxy.cs | 33 +-- .../RemoteDesktopServices.asmx.cs | 9 +- .../WebsitePanel_SharedResources.ascx.resx | 3 + .../WebsitePanel/RDS/RDSCreateCollection.ascx | 4 +- .../RDS/RDSCreateCollection.ascx.designer.cs | 36 +++ .../WebsitePanel/RDS/RDSLocalAdmins.ascx.cs | 9 +- 11 files changed, 275 insertions(+), 145 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/RemoteDesktopServicesProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/RemoteDesktopServicesProxy.cs index af25ea50..6ba412b9 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/RemoteDesktopServicesProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/RemoteDesktopServicesProxy.cs @@ -2155,16 +2155,16 @@ namespace WebsitePanel.EnterpriseServer { /// [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRdsCollectionLocalAdmins", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public OrganizationUser[] GetRdsCollectionLocalAdmins(int itemId) { + public OrganizationUser[] GetRdsCollectionLocalAdmins(int collectionId) { object[] results = this.Invoke("GetRdsCollectionLocalAdmins", new object[] { - itemId}); + collectionId}); return ((OrganizationUser[])(results[0])); } /// - public System.IAsyncResult BeginGetRdsCollectionLocalAdmins(int itemId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetRdsCollectionLocalAdmins(int collectionId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetRdsCollectionLocalAdmins", new object[] { - itemId}, callback, asyncState); + collectionId}, callback, asyncState); } /// @@ -2174,17 +2174,17 @@ namespace WebsitePanel.EnterpriseServer { } /// - public void GetRdsCollectionLocalAdminsAsync(int itemId) { - this.GetRdsCollectionLocalAdminsAsync(itemId, null); + public void GetRdsCollectionLocalAdminsAsync(int collectionId) { + this.GetRdsCollectionLocalAdminsAsync(collectionId, null); } /// - public void GetRdsCollectionLocalAdminsAsync(int itemId, object userState) { + public void GetRdsCollectionLocalAdminsAsync(int collectionId, object userState) { if ((this.GetRdsCollectionLocalAdminsOperationCompleted == null)) { this.GetRdsCollectionLocalAdminsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetRdsCollectionLocalAdminsOperationCompleted); } this.InvokeAsync("GetRdsCollectionLocalAdmins", new object[] { - itemId}, this.GetRdsCollectionLocalAdminsOperationCompleted, userState); + collectionId}, this.GetRdsCollectionLocalAdminsOperationCompleted, userState); } private void OnGetRdsCollectionLocalAdminsOperationCompleted(object arg) { @@ -2196,18 +2196,18 @@ namespace WebsitePanel.EnterpriseServer { /// [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SaveRdsCollectionLocalAdmins", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ResultObject SaveRdsCollectionLocalAdmins(OrganizationUser[] users, int itemId) { + public ResultObject SaveRdsCollectionLocalAdmins(OrganizationUser[] users, int collectionId) { object[] results = this.Invoke("SaveRdsCollectionLocalAdmins", new object[] { users, - itemId}); + collectionId}); return ((ResultObject)(results[0])); } /// - public System.IAsyncResult BeginSaveRdsCollectionLocalAdmins(OrganizationUser[] users, int itemId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSaveRdsCollectionLocalAdmins(OrganizationUser[] users, int collectionId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("SaveRdsCollectionLocalAdmins", new object[] { users, - itemId}, callback, asyncState); + collectionId}, callback, asyncState); } /// @@ -2217,18 +2217,18 @@ namespace WebsitePanel.EnterpriseServer { } /// - public void SaveRdsCollectionLocalAdminsAsync(OrganizationUser[] users, int itemId) { - this.SaveRdsCollectionLocalAdminsAsync(users, itemId, null); + public void SaveRdsCollectionLocalAdminsAsync(OrganizationUser[] users, int collectionId) { + this.SaveRdsCollectionLocalAdminsAsync(users, collectionId, null); } /// - public void SaveRdsCollectionLocalAdminsAsync(OrganizationUser[] users, int itemId, object userState) { + public void SaveRdsCollectionLocalAdminsAsync(OrganizationUser[] users, int collectionId, object userState) { if ((this.SaveRdsCollectionLocalAdminsOperationCompleted == null)) { this.SaveRdsCollectionLocalAdminsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSaveRdsCollectionLocalAdminsOperationCompleted); } this.InvokeAsync("SaveRdsCollectionLocalAdmins", new object[] { users, - itemId}, this.SaveRdsCollectionLocalAdminsOperationCompleted, userState); + collectionId}, this.SaveRdsCollectionLocalAdminsOperationCompleted, userState); } private void OnSaveRdsCollectionLocalAdminsOperationCompleted(object arg) { diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs index 04da46cb..e1561f26 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs @@ -268,14 +268,14 @@ namespace WebsitePanel.EnterpriseServer return RestartRdsServerInternal(itemId, fqdnName); } - public static List GetRdsCollectionLocalAdmins(int itemId) + public static List GetRdsCollectionLocalAdmins(int collectionId) { - return GetRdsCollectionLocalAdminsInternal(itemId); + return GetRdsCollectionLocalAdminsInternal(collectionId); } - public static ResultObject SaveRdsCollectionLocalAdmins(OrganizationUser[] users, int itemId) + public static ResultObject SaveRdsCollectionLocalAdmins(OrganizationUser[] users, int collectionId) { - return SaveRdsCollectionLocalAdminsInternal(users, itemId); + return SaveRdsCollectionLocalAdminsInternal(users, collectionId); } private static RdsCollection GetRdsCollectionInternal(int collectionId) @@ -310,10 +310,12 @@ namespace WebsitePanel.EnterpriseServer return collection; } - private static List GetRdsCollectionLocalAdminsInternal(int itemId) + private static List GetRdsCollectionLocalAdminsInternal(int collectionId) { var result = new List(); - Organization org = OrganizationController.GetOrganization(itemId); + var collection = ObjectUtils.FillObjectFromDataReader(DataProvider.GetRDSCollectionById(collectionId)); + var servers = ObjectUtils.CreateListFromDataReader(DataProvider.GetRDSServersByCollectionId(collection.Id)).ToList(); + Organization org = OrganizationController.GetOrganization(collection.ItemId); if (org == null) { @@ -322,19 +324,20 @@ namespace WebsitePanel.EnterpriseServer var rds = GetRemoteDesktopServices(GetRemoteDesktopServiceID(org.PackageId)); - var organizationUsers = OrganizationController.GetOrganizationUsersPaged(itemId, null, null, null, 0, Int32.MaxValue).PageUsers; - var organizationAdmins = rds.GetRdsCollectionLocalAdmins(org.OrganizationId); + var organizationUsers = OrganizationController.GetOrganizationUsersPaged(collection.ItemId, null, null, null, 0, Int32.MaxValue).PageUsers; + var organizationAdmins = rds.GetRdsCollectionLocalAdmins(servers.First().FqdName); - return organizationUsers.Where(o => organizationAdmins.Select(a => a.ToLower()).Contains(o.SamAccountName.ToLower())).ToList(); + return organizationUsers.Where(o => organizationAdmins.Select(a => a.ToLower()).Contains(o.DomainUserName.ToLower())).ToList(); } - private static ResultObject SaveRdsCollectionLocalAdminsInternal(OrganizationUser[] users, int itemId) + private static ResultObject SaveRdsCollectionLocalAdminsInternal(OrganizationUser[] users, int collectionId) { var result = TaskManager.StartResultTask("REMOTE_DESKTOP_SERVICES", "SAVE_LOCAL_ADMINS"); try - { - Organization org = OrganizationController.GetOrganization(itemId); + { + var collection = ObjectUtils.FillObjectFromDataReader(DataProvider.GetRDSCollectionById(collectionId)); + Organization org = OrganizationController.GetOrganization(collection.ItemId); if (org == null) { @@ -344,7 +347,9 @@ namespace WebsitePanel.EnterpriseServer } var rds = GetRemoteDesktopServices(GetRemoteDesktopServiceID(org.PackageId)); - rds.SaveRdsCollectionLocalAdmins(users.Select(u => u.AccountName).ToArray(), org.OrganizationId); + var servers = ObjectUtils.CreateListFromDataReader(DataProvider.GetRDSServersByCollectionId(collection.Id)).ToList(); + + rds.SaveRdsCollectionLocalAdmins(users, servers.Select(s => s.FqdName).ToArray()); } catch (Exception ex) { diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esRemoteDesktopServices.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esRemoteDesktopServices.asmx.cs index 9cbd8c42..e6391df1 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esRemoteDesktopServices.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esRemoteDesktopServices.asmx.cs @@ -315,15 +315,15 @@ namespace WebsitePanel.EnterpriseServer } [WebMethod] - public List GetRdsCollectionLocalAdmins(int itemId) + public List GetRdsCollectionLocalAdmins(int collectionId) { - return RemoteDesktopServicesController.GetRdsCollectionLocalAdmins(itemId); + return RemoteDesktopServicesController.GetRdsCollectionLocalAdmins(collectionId); } [WebMethod] - public ResultObject SaveRdsCollectionLocalAdmins(OrganizationUser[] users, int itemId) + public ResultObject SaveRdsCollectionLocalAdmins(OrganizationUser[] users, int collectionId) { - return RemoteDesktopServicesController.SaveRdsCollectionLocalAdmins(users, itemId); + return RemoteDesktopServicesController.SaveRdsCollectionLocalAdmins(users, collectionId); } } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/RemoteDesktopServices/IRemoteDesktopServices.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/RemoteDesktopServices/IRemoteDesktopServices.cs index 86448293..9ecc03eb 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/RemoteDesktopServices/IRemoteDesktopServices.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/RemoteDesktopServices/IRemoteDesktopServices.cs @@ -31,6 +31,7 @@ using System.Collections; using System.Collections.Generic; using System.Net; using System.Net.Sockets; +using WebsitePanel.Providers.HostedSolution; namespace WebsitePanel.Providers.RemoteDesktopServices { @@ -73,8 +74,8 @@ namespace WebsitePanel.Providers.RemoteDesktopServices string GetRdsServerStatus(string serverName); void ShutDownRdsServer(string serverName); void RestartRdsServer(string serverName); - void SaveRdsCollectionLocalAdmins(List users, string organizationId); - List GetRdsCollectionLocalAdmins(string organizationId); + void SaveRdsCollectionLocalAdmins(List users, List hosts); + List GetRdsCollectionLocalAdmins(string hostName); void MoveRdsServerToTenantOU(string hostName, string organizationId); void RemoveRdsServerFromTenantOU(string hostName, string organizationId); } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.TerminalServices.Windows2012/Windows2012.cs b/WebsitePanel/Sources/WebsitePanel.Providers.TerminalServices.Windows2012/Windows2012.cs index a9ebf044..515250c5 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.TerminalServices.Windows2012/Windows2012.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.TerminalServices.Windows2012/Windows2012.cs @@ -49,6 +49,7 @@ using System.Management.Automation.Runspaces; using System.Collections.ObjectModel; using System.DirectoryServices; using System.Security.Cryptography.X509Certificates; +using System.Collections; namespace WebsitePanel.Providers.RemoteDesktopServices @@ -66,8 +67,11 @@ namespace WebsitePanel.Providers.RemoteDesktopServices private const string RdsGroupFormat = "rds-{0}-{1}"; private const string RdsModuleName = "RemoteDesktopServices"; private const string AddNpsString = "netsh nps add np name=\"\"{0}\"\" policysource=\"1\" processingorder=\"{1}\" conditionid=\"0x3d\" conditiondata=\"^5$\" conditionid=\"0x1fb5\" conditiondata=\"{2}\" conditionid=\"0x1e\" conditiondata=\"UserAuthType:(PW|CA)\" profileid=\"0x1005\" profiledata=\"TRUE\" profileid=\"0x100f\" profiledata=\"TRUE\" profileid=\"0x1009\" profiledata=\"0x7\" profileid=\"0x1fe6\" profiledata=\"0x40000000\""; - private const string WspAdministratorsGroupName = "WSPAdministrators"; - private const string RdsServersOU = "RDSServers"; + private const string WspAdministratorsGroupName = "WSP-Administrators"; + private const string WspAdministratorsGroupDescription = "WSP Administrators"; + private const string RdsServersOU = "RDSServers"; + private const uint ADS_GROUP_TYPE_UNIVERSAL_GROUP = 0x00000008; + private const uint ADS_GROUP_TYPE_SECURITY_ENABLED = 0x80000000; #endregion @@ -954,101 +958,206 @@ namespace WebsitePanel.Providers.RemoteDesktopServices #region Local Admins - public void SaveRdsCollectionLocalAdmins(List users, string organizationId) + public void SaveRdsCollectionLocalAdmins(List users, List hosts) { - if (!CheckAdminsGroup(organizationId)) - { - CreateAdminsGroup(organizationId); - } + Runspace runspace = null; - var orgPath = GetOrganizationPath(organizationId); - var orgEntry = ActiveDirectoryUtils.GetADObject(orgPath); - var existingAdmins = ActiveDirectoryUtils.GetGroupObjects(WspAdministratorsGroupName, "user", orgEntry); - var adminsGroupPath = GetWspAdminsGroupPath(organizationId); - - foreach (string userPath in existingAdmins) + try { - ActiveDirectoryUtils.RemoveObjectFromGroup(userPath, adminsGroupPath); - } - - foreach (var user in users) - { - var userPath = GetUserPath(organizationId, user); + runspace = OpenRunspace(); + var index = ServerSettings.ADRootDomain.LastIndexOf("."); + var domainName = ServerSettings.ADRootDomain; - if (ActiveDirectoryUtils.AdObjectExists(userPath)) + if (index > 0) { - var userObject = ActiveDirectoryUtils.GetADObject(userPath); - var samName = (string)ActiveDirectoryUtils.GetADObjectProperty(userObject, "sAMAccountName"); - ActiveDirectoryUtils.AddObjectToGroup(userPath, adminsGroupPath); + domainName = ServerSettings.ADRootDomain.Substring(0, index); } + + foreach (var hostName in hosts) + { + if (!CheckLocalAdminsGroupExists(hostName, runspace)) + { + var errors = CreateLocalAdministratorsGroup(hostName, runspace); + + if (errors.Any()) + { + Log.WriteWarning(string.Join("\r\n", errors.Select(e => e.ToString()).ToArray())); + throw new Exception(string.Join("\r\n", errors.Select(e => e.ToString()).ToArray())); + } + } + + var existingAdmins = GetExistingLocalAdmins(hostName, runspace).Select(e => e.ToLower()); + var formUsers = users.Select(u => string.Format("{0}\\{1}", domainName, u.SamAccountName).ToLower()); + var newUsers = users.Where(u => !existingAdmins.Contains(string.Format("{0}\\{1}", domainName, u.SamAccountName).ToLower())); + var removedUsers = existingAdmins.Where(e => !formUsers.Contains(e)); + + foreach (var user in newUsers) + { + AddNewLocalAdmin(hostName, user.SamAccountName, runspace); + } + + foreach (var user in removedUsers) + { + RemoveLocalAdmin(hostName, user, runspace); + } + } } + finally + { + CloseRunspace(runspace); + } } - public List GetRdsCollectionLocalAdmins(string organizationId) - { - var adminsGroupPath = GetWspAdminsGroupPath(organizationId); - var orgPath = GetOrganizationPath(organizationId); - var orgEntry = ActiveDirectoryUtils.GetADObject(orgPath); - var rdsAdmins = ActiveDirectoryUtils.GetGroupObjects(WspAdministratorsGroupName, "user", orgEntry); - var rootPath = GetRootOUPath(); - var rootEntry = ActiveDirectoryUtils.GetADObject(rootPath); - - var collectionUsers = ActiveDirectoryUtils.GetGroupObjects(organizationId, "user", rootEntry); - var orgAdmins = collectionUsers.Intersect(rdsAdmins); + public List GetRdsCollectionLocalAdmins(string hostName) + { + Runspace runspace = null; var result = new List(); - foreach (var admin in orgAdmins) + try { - var userObject = ActiveDirectoryUtils.GetADObject(admin); - var samName = (string)ActiveDirectoryUtils.GetADObjectProperty(userObject, "sAMAccountName"); - result.Add(samName); + runspace = OpenRunspace(); + + if (CheckLocalAdminsGroupExists(hostName, runspace)) + { + result = GetExistingLocalAdmins(hostName, runspace); + } + } + finally + { + CloseRunspace(runspace); } return result; } - private bool CheckAdminsGroup(string organizationId) + private bool CheckLocalAdminsGroupExists(string hostName, Runspace runspace) { - var adminsGroupPath = GetWspAdminsGroupPath(organizationId); - return ActiveDirectoryUtils.AdObjectExists(adminsGroupPath); + var scripts = new List + { + string.Format("net localgroup {0}", WspAdministratorsGroupName) + }; + + object[] errors = null; + var result = ExecuteRemoteShellCommand(runspace, hostName, scripts, out errors); + + if (!errors.Any()) + { + return true; + } + + return false; } - private void CreateAdminsGroup(string organizationId) + private object[] CreateLocalAdministratorsGroup(string hostName, Runspace runspace) { - var adminsRootGroupPath = GetWspAdminsRootGroupPath(organizationId); - ActiveDirectoryUtils.CreateGroup(adminsRootGroupPath, WspAdministratorsGroupName); - - string groupPath = string.Format("WinNT://{0}/{1}/{2},group", ServerSettings.ADRootDomain, PrimaryDomainController, WspAdministratorsGroupName); - - using (var userGroup = new DirectoryEntry(groupPath)) + var scripts = new List { - string localAdministratorsPath = string.Format("WinNT://{0}/{1},group", PrimaryDomainController, "Administrators"); + string.Format("$cn = [ADSI]\"WinNT://{0}\"", hostName), + string.Format("$group = $cn.Create(\"Group\", \"{0}\")", WspAdministratorsGroupName), + "$group.setinfo()", + string.Format("$group.description = \"{0}\"", WspAdministratorsGroupDescription), + "$group.setinfo()" + }; - using (DirectoryEntry group = new DirectoryEntry(localAdministratorsPath)) + object[] errors = null; + ExecuteRemoteShellCommand(runspace, hostName, scripts, out errors); + + if (!errors.Any()) + { + scripts = new List { - group.Invoke("Add", groupPath); - group.CommitChanges(); + string.Format("$GroupObj = [ADSI]\"WinNT://{0}/Administrators\"", hostName), + string.Format("$GroupObj.Add(\"WinNT://{0}/{1}\")", hostName.ToLower().Replace(string.Format(".{0}", ServerSettings.ADRootDomain.ToLower()), ""), WspAdministratorsGroupName) + }; + + errors = null; + ExecuteRemoteShellCommand(runspace, hostName, scripts, out errors); + } + + return errors; + } + + private List GetExistingLocalAdmins(string hostName, Runspace runspace) + { + var result = new List(); + + var scripts = new List + { + string.Format("net localgroup {0} | select -skip 6", WspAdministratorsGroupName) + }; + + object[] errors = null; + var exitingAdmins = ExecuteRemoteShellCommand(runspace, hostName, scripts, out errors); + + if (!errors.Any()) + { + foreach(var user in exitingAdmins.Take(exitingAdmins.Count - 2)) + { + result.Add(user.ToString()); } } + + return result; } + private object[] AddNewLocalAdmin(string hostName, string samAccountName, Runspace runspace) + { + var scripts = new List + { + string.Format("$GroupObj = [ADSI]\"WinNT://{0}/{1}\"", hostName, WspAdministratorsGroupName), + string.Format("$GroupObj.Add(\"WinNT://{0}/{1}\")", ServerSettings.ADRootDomain, samAccountName) + }; + + object[] errors = null; + ExecuteRemoteShellCommand(runspace, hostName, scripts, out errors); + + return errors; + } + + private object[] RemoveLocalAdmin(string hostName, string user, Runspace runspace) + { + var userObject = user.Split('\\'); + + var scripts = new List + { + string.Format("$GroupObj = [ADSI]\"WinNT://{0}/{1}\"", hostName, WspAdministratorsGroupName), + string.Format("$GroupObj.Remove(\"WinNT://{0}/{1}\")", userObject[0], userObject[1]) + }; + + object[] errors = null; + ExecuteRemoteShellCommand(runspace, hostName, scripts, out errors); + + return errors; + } + #endregion #region SSL public void InstallCertificate(byte[] certificate, string password, string hostName) { - var x509Cert = new X509Certificate2(certificate, password, X509KeyStorageFlags.Exportable); + Runspace runspace = null; + + try + { + var x509Cert = new X509Certificate2(certificate, password, X509KeyStorageFlags.Exportable); + runspace = OpenRunspace(); + CopyCertificateFile(certificate, hostName, runspace); + } + finally + { + CloseRunspace(runspace); + } } - private string CopyCertificateFile(byte[] certificate, string hostName) + private string CopyCertificateFile(byte[] certificate, string hostName, Runspace runspace) { var destinationPath = string.Format("\\{0}\\c$\\remoteCert.pfx", hostName); return destinationPath; } - private void DeleteCertificate(string path) + private void DeleteCertificate(string path, Runspace runspace) { } @@ -1464,32 +1573,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices AppendDomainPath(sb, RootDomain); return sb.ToString(); - } - - internal string GetWspAdminsRootGroupPath(string organizationId) - { - StringBuilder sb = new StringBuilder(); - AppendProtocol(sb); - AppendDomainController(sb); - AppendOUPath(sb, organizationId); - AppendOUPath(sb, RootOU); - AppendDomainPath(sb, RootDomain); - - return sb.ToString(); - } - - internal string GetWspAdminsGroupPath(string organizationId) - { - StringBuilder sb = new StringBuilder(); - AppendProtocol(sb); - AppendDomainController(sb); - AppendCNPath(sb, WspAdministratorsGroupName); - AppendOUPath(sb, organizationId); - AppendOUPath(sb, RootOU); - AppendDomainPath(sb, RootDomain); - - return sb.ToString(); - } + } internal string GetUsersGroupPath(string organizationId, string collection) { @@ -1778,7 +1862,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices return ExecuteShellCommand(runSpace, invokeCommand, false, out errors); } - internal Collection ExecuteRemoteShellCommand(Runspace runSpace, string hostName, List scripts, params string[] moduleImports) + internal Collection ExecuteRemoteShellCommand(Runspace runSpace, string hostName, List scripts, out object[] errors, params string[] moduleImports) { Command invokeCommand = new Command("Invoke-Command"); invokeCommand.Parameters.Add("ComputerName", hostName); @@ -1792,7 +1876,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices invokeCommand.Parameters.Add("ScriptBlock", sb); - return ExecuteShellCommand(runSpace, invokeCommand, false); + return ExecuteShellCommand(runSpace, invokeCommand, false, out errors); } internal Collection ExecuteShellCommand(Runspace runSpace, Command cmd) diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Client/RemoteDesktopServicesProxy.cs b/WebsitePanel/Sources/WebsitePanel.Server.Client/RemoteDesktopServicesProxy.cs index 2c3cfeed..b3bd520c 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Client/RemoteDesktopServicesProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Client/RemoteDesktopServicesProxy.cs @@ -18,6 +18,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices { using System.Web.Services.Protocols; using System; using System.Diagnostics; + using WebsitePanel.Providers.HostedSolution; /// @@ -1506,17 +1507,17 @@ namespace WebsitePanel.Providers.RemoteDesktopServices { /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SaveRdsCollectionLocalAdmins", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void SaveRdsCollectionLocalAdmins(string[] users, string organizationId) { + public void SaveRdsCollectionLocalAdmins(OrganizationUser[] users, string[] hosts) { this.Invoke("SaveRdsCollectionLocalAdmins", new object[] { users, - organizationId}); + hosts}); } /// - public System.IAsyncResult BeginSaveRdsCollectionLocalAdmins(string[] users, string organizationId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSaveRdsCollectionLocalAdmins(OrganizationUser[] users, string[] hosts, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("SaveRdsCollectionLocalAdmins", new object[] { users, - organizationId}, callback, asyncState); + hosts}, callback, asyncState); } /// @@ -1525,18 +1526,18 @@ namespace WebsitePanel.Providers.RemoteDesktopServices { } /// - public void SaveRdsCollectionLocalAdminsAsync(string[] users, string organizationId) { - this.SaveRdsCollectionLocalAdminsAsync(users, organizationId, null); + public void SaveRdsCollectionLocalAdminsAsync(OrganizationUser[] users, string[] hosts) { + this.SaveRdsCollectionLocalAdminsAsync(users, hosts, null); } /// - public void SaveRdsCollectionLocalAdminsAsync(string[] users, string organizationId, object userState) { + public void SaveRdsCollectionLocalAdminsAsync(OrganizationUser[] users, string[] hosts, object userState) { if ((this.SaveRdsCollectionLocalAdminsOperationCompleted == null)) { this.SaveRdsCollectionLocalAdminsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSaveRdsCollectionLocalAdminsOperationCompleted); } this.InvokeAsync("SaveRdsCollectionLocalAdmins", new object[] { users, - organizationId}, this.SaveRdsCollectionLocalAdminsOperationCompleted, userState); + hosts}, this.SaveRdsCollectionLocalAdminsOperationCompleted, userState); } private void OnSaveRdsCollectionLocalAdminsOperationCompleted(object arg) { @@ -1549,16 +1550,16 @@ namespace WebsitePanel.Providers.RemoteDesktopServices { /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetRdsCollectionLocalAdmins", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public string[] GetRdsCollectionLocalAdmins(string organizationId) { + public string[] GetRdsCollectionLocalAdmins(string hostName) { object[] results = this.Invoke("GetRdsCollectionLocalAdmins", new object[] { - organizationId}); + hostName}); return ((string[])(results[0])); } /// - public System.IAsyncResult BeginGetRdsCollectionLocalAdmins(string organizationId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetRdsCollectionLocalAdmins(string hostName, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetRdsCollectionLocalAdmins", new object[] { - organizationId}, callback, asyncState); + hostName}, callback, asyncState); } /// @@ -1568,17 +1569,17 @@ namespace WebsitePanel.Providers.RemoteDesktopServices { } /// - public void GetRdsCollectionLocalAdminsAsync(string organizationId) { - this.GetRdsCollectionLocalAdminsAsync(organizationId, null); + public void GetRdsCollectionLocalAdminsAsync(string hostName) { + this.GetRdsCollectionLocalAdminsAsync(hostName, null); } /// - public void GetRdsCollectionLocalAdminsAsync(string organizationId, object userState) { + public void GetRdsCollectionLocalAdminsAsync(string hostName, object userState) { if ((this.GetRdsCollectionLocalAdminsOperationCompleted == null)) { this.GetRdsCollectionLocalAdminsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetRdsCollectionLocalAdminsOperationCompleted); } this.InvokeAsync("GetRdsCollectionLocalAdmins", new object[] { - organizationId}, this.GetRdsCollectionLocalAdminsOperationCompleted, userState); + hostName}, this.GetRdsCollectionLocalAdminsOperationCompleted, userState); } private void OnGetRdsCollectionLocalAdminsOperationCompleted(object arg) { diff --git a/WebsitePanel/Sources/WebsitePanel.Server/RemoteDesktopServices.asmx.cs b/WebsitePanel/Sources/WebsitePanel.Server/RemoteDesktopServices.asmx.cs index 32d6533d..decdada6 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server/RemoteDesktopServices.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server/RemoteDesktopServices.asmx.cs @@ -42,6 +42,7 @@ using WebsitePanel.Providers; using WebsitePanel.Providers.OS; using WebsitePanel.Providers.RemoteDesktopServices; using WebsitePanel.Server.Utils; +using WebsitePanel.Providers.HostedSolution; namespace WebsitePanel.Server { @@ -565,12 +566,12 @@ namespace WebsitePanel.Server } [WebMethod, SoapHeader("settings")] - public void SaveRdsCollectionLocalAdmins(List users, string organizationId) + public void SaveRdsCollectionLocalAdmins(List users, List hosts) { try { Log.WriteStart("'{0}' SaveRdsCollectionLocalAdmins", ProviderSettings.ProviderName); - RDSProvider.SaveRdsCollectionLocalAdmins(users, organizationId); + RDSProvider.SaveRdsCollectionLocalAdmins(users, hosts); Log.WriteEnd("'{0}' SaveRdsCollectionLocalAdmins", ProviderSettings.ProviderName); } catch (Exception ex) @@ -581,12 +582,12 @@ namespace WebsitePanel.Server } [WebMethod, SoapHeader("settings")] - public List GetRdsCollectionLocalAdmins(string organizationId) + public List GetRdsCollectionLocalAdmins(string hostName) { try { Log.WriteStart("'{0}' GetRdsCollectionLocalAdmins", ProviderSettings.ProviderName); - var result = RDSProvider.GetRdsCollectionLocalAdmins(organizationId); + var result = RDSProvider.GetRdsCollectionLocalAdmins(hostName); Log.WriteEnd("'{0}' GetRdsCollectionLocalAdmins", ProviderSettings.ProviderName); return result; 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 2a64f5b2..03fcb7be 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx @@ -5647,6 +5647,9 @@ RDS server not assigned to organization + + Local admins not added + RDS User logging off error diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSCreateCollection.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSCreateCollection.ascx index e73c543a..e7277028 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSCreateCollection.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSCreateCollection.ascx @@ -30,7 +30,7 @@
- <%-- @@ -48,7 +48,7 @@
- --%> +
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSCreateCollection.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSCreateCollection.ascx.designer.cs index b1666d95..f61636b8 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSCreateCollection.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSCreateCollection.ascx.designer.cs @@ -75,6 +75,42 @@ namespace WebsitePanel.Portal.RDS { /// protected global::System.Web.UI.WebControls.RequiredFieldValidator valCollectionName; + /// + /// secSelectSertificate control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.CollapsiblePanel secSelectSertificate; + + /// + /// panelSelectSertificate control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel panelSelectSertificate; + + /// + /// upPFX control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.FileUpload upPFX; + + /// + /// txtPFXInstallPassword control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtPFXInstallPassword; + /// /// RDSServersPanel control. /// diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSLocalAdmins.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSLocalAdmins.ascx.cs index 6125bc19..1ea540d9 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSLocalAdmins.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSLocalAdmins.ascx.cs @@ -12,9 +12,8 @@ namespace WebsitePanel.Portal.RDS protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) - { - var organizationUsers = ES.Services.Organizations.GetOrganizationUsersPaged(PanelRequest.ItemID, null, null, null, 0, Int32.MaxValue).PageUsers; - var collectionLocalAdmins = ES.Services.RDS.GetRdsCollectionLocalAdmins(PanelRequest.ItemID); + { + var collectionLocalAdmins = ES.Services.RDS.GetRdsCollectionLocalAdmins(PanelRequest.CollectionID); var collection = ES.Services.RDS.GetRdsCollection(PanelRequest.CollectionID); litCollectionName.Text = collection.DisplayName; @@ -26,11 +25,11 @@ namespace WebsitePanel.Portal.RDS { try { - ES.Services.RDS.SaveRdsCollectionLocalAdmins(users.GetUsers(), PanelRequest.ItemID); + ES.Services.RDS.SaveRdsCollectionLocalAdmins(users.GetUsers(), PanelRequest.CollectionID); } catch (Exception ex) { - messageBox.ShowErrorMessage(ex.Message); + ShowErrorMessage("RDSLOCALADMINS_NOT_ADDED", ex); return false; } From 1e9b30be3568a5b423b96cafb33db9273af98b57 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Mon, 23 Feb 2015 17:42:35 -0500 Subject: [PATCH 09/13] Added tag build-2.1.0.589 for changeset c92c635ee801 From 374f176802444f15eef7bce34b35573e72e5870a Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Mon, 23 Feb 2015 18:20:09 -0500 Subject: [PATCH 10/13] Added tag build-2.1.0.590 for changeset 9842b24f161b From 3c97421fee56f1889380cb38f6aef2cd9a855e81 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Mon, 23 Feb 2015 18:50:01 -0500 Subject: [PATCH 11/13] Added tag build-2.1.0.591 for changeset ac95d89587c0 From 50e61dbfdf41296b9e4cd54bea30104dc29ced69 Mon Sep 17 00:00:00 2001 From: dev_amdtel Date: Tue, 24 Feb 2015 05:29:51 +0400 Subject: [PATCH 12/13] wsp-10319 User notes do not render html code --- .../WebsitePanel/UserControls/EditItemComments.ascx.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/EditItemComments.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/EditItemComments.ascx.cs index 16def0cd..65843410 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/EditItemComments.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/EditItemComments.ascx.cs @@ -125,7 +125,7 @@ namespace WebsitePanel.Portal public string WrapComment(string text) { - return (text != null) ? PortalAntiXSS.EncodeOld(text.Replace("\n", "
")) : text; + return (text != null) ? Server.HtmlEncode(text).Replace("\n", "
") : text; } protected void gvComments_RowDeleting(object sender, GridViewDeleteEventArgs e) From 9f841cac14aa0b101afef0477817a0059e3e1f0a Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Mon, 23 Feb 2015 21:37:51 -0500 Subject: [PATCH 13/13] Added tag build-2.1.0.592 for changeset 771ca5162366