From ced48c71eae1c77184aad13274535f8afb310bb6 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Fri, 4 Jan 2013 08:58:59 -0500 Subject: [PATCH 1/8] Added tag build-2.0.0.232 for changeset 8d67c7edac63 From aef44beb2234520590f63a63d11211ce3fb4dd55 Mon Sep 17 00:00:00 2001 From: Christopher York Date: Fri, 4 Jan 2013 14:58:08 -0600 Subject: [PATCH 2/8] Fixed: Child account packages not suspending resulting in child services not being suspended with the parent. Fixed: Child account peer users were not being suspended when the parent is suspended. --- .../Code/Users/UserController.cs | 34 ++++++++++++------- 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Users/UserController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Users/UserController.cs index 14893de2..ff333445 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Users/UserController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Users/UserController.cs @@ -678,6 +678,12 @@ namespace WebsitePanel.EnterpriseServer TaskManager.StartTask(taskId, "USER", "CHANGE_STATUS", user.Username); TaskManager.ItemId = user.UserId; + // update user packages + List packages = new List(); + + // Add the users package(s) + packages.AddRange(PackageController.GetPackages(userId)); + try { @@ -699,20 +705,24 @@ namespace WebsitePanel.EnterpriseServer List children = GetUsers(userId, true); foreach (UserInfo child in children) { - result = ChangeUserStatusInternal(child.UserId, status); - if (result < 0) - return result; + // Add the child users packages + packages.AddRange(PackageController.GetPackages(child.UserId)); + + // change child user peers + List childPeers = GetUserPeers(child.UserId); + foreach (UserInfo peer in childPeers) + { + result = ChangeUserStatusInternal(peer.UserId, status); + if (result < 0) + return result; + } + + // change child account + result = ChangeUserStatusInternal(child.UserId, status); + if (result < 0) + return result; } - // update user packages - List packages = new List(); - - // his packages - packages.AddRange(PackageController.GetMyPackages(userId)); - - // children packages - packages.AddRange(PackageController.GetPackages(userId)); - PackageStatus packageStatus = PackageStatus.Active; switch (status) { From dd13c67eaea3318204c5c22e29a3bdcfa6b7c9e2 Mon Sep 17 00:00:00 2001 From: ruslanht Date: Mon, 7 Jan 2013 12:20:22 +0200 Subject: [PATCH 3/8] Helicon Ape in IIS 7 settings fixed --- .../ProviderControls/IIS70_Settings.ascx.cs | 31 +++++++++---------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IIS70_Settings.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IIS70_Settings.ascx.cs index ba4737f3..a343dc3c 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IIS70_Settings.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IIS70_Settings.ascx.cs @@ -157,7 +157,7 @@ namespace WebsitePanel.Portal.ProviderControls downloadApePanel.Visible = false; txtHeliconApeVersion.Text = sts.Version; lblHeliconRegistrationText.Text = sts.RegistrationInfo; - + if (sts.IsEnabled) { chkHeliconApeGlobalRegistration.Checked = true; @@ -171,7 +171,7 @@ namespace WebsitePanel.Portal.ProviderControls // Build url manually, EditUrl throws exception: module is Null // pid=Servers&mid=137&ctl=edit_platforminstaller&ServerID=1&Product=HeliconApe - List qsParts= new List(); + List qsParts = new List(); qsParts.Add("pid=Servers"); qsParts.Add("ctl=edit_platforminstaller"); @@ -180,6 +180,7 @@ namespace WebsitePanel.Portal.ProviderControls qsParts.Add("WPIProduct=HeliconApe"); InstallHeliconApeLink.Attributes["href"] = "Default.aspx?" + String.Join("&", qsParts.ToArray()); + ViewState["HeliconApeInitiallyEnabled"] = null; } // @@ -273,25 +274,23 @@ namespace WebsitePanel.Portal.ProviderControls ActiveDirectoryIntegration.SaveSettings(settings); + // Helicon Ape - bool registerHeliconApeGlobbally = chkHeliconApeGlobalRegistration.Checked; - - bool bHeliconApeInitiallyEnabled = false; - if (ViewState["HeliconApeInitiallyEnabled"] != null) - bHeliconApeInitiallyEnabled = (bool)ViewState["HeliconApeInitiallyEnabled"]; - - if (registerHeliconApeGlobbally != bHeliconApeInitiallyEnabled) + if (null != ViewState["HeliconApeInitiallyEnabled"]) { - if (registerHeliconApeGlobbally) + bool registerHeliconApeGlobbally = chkHeliconApeGlobalRegistration.Checked; + if (registerHeliconApeGlobbally != (bool)ViewState["HeliconApeInitiallyEnabled"]) { - ES.Services.WebServers.EnableHeliconApeGlobally(int.Parse(Request.QueryString["ServiceID"])); - } - else - { - ES.Services.WebServers.DisableHeliconApeGlobally(int.Parse(Request.QueryString["ServiceID"])); + if (registerHeliconApeGlobbally) + { + ES.Services.WebServers.EnableHeliconApeGlobally(int.Parse(Request.QueryString["ServiceID"])); + } + else + { + ES.Services.WebServers.DisableHeliconApeGlobally(int.Parse(Request.QueryString["ServiceID"])); + } } } - if (WDeployEnabledCheckBox.Checked) From 9e9f3f7b6245410cf202850ee8125f9ca88ea3cd Mon Sep 17 00:00:00 2001 From: ruslanht Date: Mon, 7 Jan 2013 12:26:01 +0200 Subject: [PATCH 4/8] Web App Gallery installer: bind db policies when database mode changed --- .../WebsitePanel/WebApplicationGalleryParams.ascx.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebApplicationGalleryParams.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebApplicationGalleryParams.ascx.cs index 1bfbb79a..0222ec36 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebApplicationGalleryParams.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebApplicationGalleryParams.ascx.cs @@ -334,7 +334,13 @@ namespace WebsitePanel.Portal protected void databaseMode_SelectedIndexChanged(object sender, EventArgs e) { - BindParameters(); + // load parameters + List parameters = GetApplicationParameters(); + if (parameters == null) + return; + + BindDBPolicies(parameters); + BindParameters(parameters); } private void BindParameters() From f208ce25221980588de073c1110307cd8781e3e3 Mon Sep 17 00:00:00 2001 From: ruslanht Date: Mon, 7 Jan 2013 12:44:14 +0200 Subject: [PATCH 5/8] Web App Gallery installer: validate mysql username length --- .../WebApplicationGalleryParamControl.ascx | 4 ++++ .../WebApplicationGalleryParamControl.ascx.cs | 24 +++++++++++++++++++ ...cationGalleryParamControl.ascx.designer.cs | 9 +++++++ 3 files changed, 37 insertions(+) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebApplicationGalleryParamControl.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebApplicationGalleryParamControl.ascx index 4fd2dd72..6fe8e91b 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebApplicationGalleryParamControl.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebApplicationGalleryParamControl.ascx @@ -52,6 +52,10 @@ + diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebApplicationGalleryParamControl.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebApplicationGalleryParamControl.ascx.cs index 6f0258ce..d2bd968b 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebApplicationGalleryParamControl.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebApplicationGalleryParamControl.ascx.cs @@ -213,6 +213,15 @@ namespace WebsitePanel.Portal textValue.Text = DefaultValue; valPrefix.Text = ValuePrefix; valSuffix.Text = ValueSuffix; + + if ( + (WellKnownTags & DeploymentParameterWellKnownTag.MySql) == DeploymentParameterWellKnownTag.MySql + && + (WellKnownTags & DeploymentParameterWellKnownTag.DBUserName) == DeploymentParameterWellKnownTag.DBUserName + ) + { + MysqlUsernameLengthValidator.Enabled = true; + } } @@ -248,5 +257,20 @@ namespace WebsitePanel.Portal } + + protected void mysqlUsernameLen_OnServerValidate(object source, ServerValidateEventArgs args) + { + args.IsValid = true; + + // get entered database name with prefixes / suffixes + string value = GetParameterValue(); + + // check length + if (!string.IsNullOrEmpty(value) && value.Length <= 16) + return; + + // validation failed + args.IsValid = false; + } } } \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebApplicationGalleryParamControl.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebApplicationGalleryParamControl.ascx.designer.cs index 28c270f4..1477051e 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebApplicationGalleryParamControl.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebApplicationGalleryParamControl.ascx.designer.cs @@ -165,6 +165,15 @@ namespace WebsitePanel.Portal { /// protected global::System.Web.UI.WebControls.RegularExpressionValidator regexpTextValue; + /// + /// MysqlUsernameLengthValidator control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CustomValidator MysqlUsernameLengthValidator; + /// /// BooleanControl control. /// From 40b39a1469c9879cb094dda8476a5fe9348f92b2 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Mon, 7 Jan 2013 10:35:03 -0500 Subject: [PATCH 6/8] Merge --- .../WebApplicationGalleryParamControl.ascx.cs | 30 ++++++++++++++++++- ...cationGalleryParamControl.ascx.designer.cs | 30 ++++++++++++++++++- 2 files changed, 58 insertions(+), 2 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebApplicationGalleryParamControl.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebApplicationGalleryParamControl.ascx.cs index d2bd968b..fb4feb9c 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebApplicationGalleryParamControl.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebApplicationGalleryParamControl.ascx.cs @@ -1,4 +1,32 @@ -using System; +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; using System.Collections.Generic; using System.Web; using System.Web.UI; diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebApplicationGalleryParamControl.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebApplicationGalleryParamControl.ascx.designer.cs index 1477051e..2a4bb091 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebApplicationGalleryParamControl.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebApplicationGalleryParamControl.ascx.designer.cs @@ -1,4 +1,32 @@ -//------------------------------------------------------------------------------ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +//------------------------------------------------------------------------------ // // This code was generated by a tool. // From 90c560bd24648eeaff2d3c5d49c9ab60eefaa9e9 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Mon, 7 Jan 2013 10:50:57 -0500 Subject: [PATCH 7/8] Added tag build-2.0.0.233 for changeset 068f388d50d5 From 3c8419b4fa3a7a94d51b46d0a41ff8f1d5ae9c1f Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Mon, 7 Jan 2013 10:59:41 -0500 Subject: [PATCH 8/8] Added tag build-2.0.0.236 for changeset d19b8e0bb912