diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Installer.Core/Properties/Settings.Designer.cs b/WebsitePanel.Installer/Sources/WebsitePanel.Installer.Core/Properties/Settings.Designer.cs index 26d7262a..7ff648a1 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Installer.Core/Properties/Settings.Designer.cs +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Installer.Core/Properties/Settings.Designer.cs @@ -26,7 +26,7 @@ namespace WebsitePanel.Installer.Core.Properties { [global::System.Configuration.ApplicationScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.WebServiceUrl)] - [global::System.Configuration.DefaultSettingValueAttribute("http://www.websitepanel.net/Services/InstallerService.asmx")] + [global::System.Configuration.DefaultSettingValueAttribute("http://www.websitepanel.net/Services/InstallerService-2.0.asmx")] public string WebsitePanel_Installer_Core_InstallerService_InstallerService { get { return ((string)(this["WebsitePanel_Installer_Core_InstallerService_InstallerService"])); diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Installer.Core/Properties/Settings.settings b/WebsitePanel.Installer/Sources/WebsitePanel.Installer.Core/Properties/Settings.settings index 849e4839..32a58250 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Installer.Core/Properties/Settings.settings +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Installer.Core/Properties/Settings.settings @@ -3,7 +3,7 @@ - http://www.websitepanel.net/Services/InstallerService.asmx + http://www.websitepanel.net/Services/InstallerService-2.0.asmx \ No newline at end of file diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Installer.Core/ServiceProviderProxy.cs b/WebsitePanel.Installer/Sources/WebsitePanel.Installer.Core/ServiceProviderProxy.cs index bebbfd30..32379607 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Installer.Core/ServiceProviderProxy.cs +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Installer.Core/ServiceProviderProxy.cs @@ -48,7 +48,7 @@ namespace WebsitePanel.Installer.Core } else { - webService.Url = "http://www.websitepanel.net/Services/InstallerService.asmx"; + webService.Url = "http://www.websitepanel.net/Services/InstallerService-2.0.asmx"; } // check if we need to add a proxy to access Internet diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Installer.Core/Web References/InstallerService/InstallerService.disco b/WebsitePanel.Installer/Sources/WebsitePanel.Installer.Core/Web References/InstallerService/InstallerService.disco index 25fbb398..7d6644d1 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Installer.Core/Web References/InstallerService/InstallerService.disco +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Installer.Core/Web References/InstallerService/InstallerService.disco @@ -1,6 +1,6 @@ - - - + + + \ No newline at end of file diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Installer.Core/Web References/InstallerService/InstallerService.wsdl b/WebsitePanel.Installer/Sources/WebsitePanel.Installer.Core/Web References/InstallerService/InstallerService.wsdl index 6de2de10..efe74830 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Installer.Core/Web References/InstallerService/InstallerService.wsdl +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Installer.Core/Web References/InstallerService/InstallerService.wsdl @@ -294,10 +294,10 @@ - + - + \ No newline at end of file diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Installer.Core/Web References/InstallerService/Reference.map b/WebsitePanel.Installer/Sources/WebsitePanel.Installer.Core/Web References/InstallerService/Reference.map index ebf6cfab..e67f00f2 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Installer.Core/Web References/InstallerService/Reference.map +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Installer.Core/Web References/InstallerService/Reference.map @@ -1,7 +1,7 @@ - - + + \ No newline at end of file diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Installer.Core/WebsitePanel.Installer.Core.csproj b/WebsitePanel.Installer/Sources/WebsitePanel.Installer.Core/WebsitePanel.Installer.Core.csproj index c33c09e2..a6dffff2 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Installer.Core/WebsitePanel.Installer.Core.csproj +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Installer.Core/WebsitePanel.Installer.Core.csproj @@ -110,10 +110,10 @@ - + Dynamic Web References\InstallerService\ - http://www.websitepanel.net/Services/InstallerService.asmx + http://www.websitepanel.net/Services/InstallerService-2.0.asmx diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Installer.Core/app.config b/WebsitePanel.Installer/Sources/WebsitePanel.Installer.Core/app.config index 2d080502..7e4789c2 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Installer.Core/app.config +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Installer.Core/app.config @@ -13,7 +13,7 @@ - http://www.websitepanel.net/Services/InstallerService.asmx + http://www.websitepanel.net/Services/InstallerService-2.0.asmx diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Updater/Web References/Services/InstallerService.disco b/WebsitePanel.Installer/Sources/WebsitePanel.Updater/Web References/Services/InstallerService.disco index 70beaaa0..a775a480 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Updater/Web References/Services/InstallerService.disco +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Updater/Web References/Services/InstallerService.disco @@ -1,6 +1,6 @@ - - - + + + \ No newline at end of file diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Updater/Web References/Services/InstallerService.wsdl b/WebsitePanel.Installer/Sources/WebsitePanel.Updater/Web References/Services/InstallerService.wsdl index dfe09e67..618a3ec1 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Updater/Web References/Services/InstallerService.wsdl +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Updater/Web References/Services/InstallerService.wsdl @@ -145,10 +145,10 @@ - + - + \ No newline at end of file diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Updater/Web References/Services/Reference.cs b/WebsitePanel.Installer/Sources/WebsitePanel.Updater/Web References/Services/Reference.cs index b638760f..5c240ebd 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Updater/Web References/Services/Reference.cs +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Updater/Web References/Services/Reference.cs @@ -40,7 +40,7 @@ namespace WebsitePanel.Updater.Services { /// public InstallerService() { - this.Url = "http://localhost/WebsitePanelSite/Services/InstallerService.asmx"; + this.Url = "http://localhost/WebsitePanelSite/Services/InstallerService-2.0.asmx"; if ((this.IsLocalFileSystemWebService(this.Url) == true)) { this.UseDefaultCredentials = true; this.useDefaultCredentialsSetExplicitly = false; diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Updater/Web References/Services/Reference.map b/WebsitePanel.Installer/Sources/WebsitePanel.Updater/Web References/Services/Reference.map index a404a967..4b67d079 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Updater/Web References/Services/Reference.map +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Updater/Web References/Services/Reference.map @@ -1,7 +1,7 @@ - - + + \ No newline at end of file diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Updater/WebsitePanel.Updater.csproj b/WebsitePanel.Installer/Sources/WebsitePanel.Updater/WebsitePanel.Updater.csproj index 68e87839..e23eb9e7 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Updater/WebsitePanel.Updater.csproj +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Updater/WebsitePanel.Updater.csproj @@ -107,10 +107,10 @@ - + Static Web References\Services\ - http://localhost/WebsitePanelSite/Services/InstallerService.asmx + http://localhost/WebsitePanelSite/Services/InstallerService-2.0.asmx diff --git a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Services/InstallerService-2.0.asmx b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Services/InstallerService-2.0.asmx new file mode 100644 index 00000000..69586188 --- /dev/null +++ b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Services/InstallerService-2.0.asmx @@ -0,0 +1 @@ +<%@ WebService Language="C#" CodeBehind="InstallerService-2.0.asmx.cs" Class="WebsitePanel.WebSite.Services.InstallerService_20" %> diff --git a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Services/InstallerService-2.0.asmx.cs b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Services/InstallerService-2.0.asmx.cs new file mode 100644 index 00000000..8fe54629 --- /dev/null +++ b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Services/InstallerService-2.0.asmx.cs @@ -0,0 +1,53 @@ +/* Copyright (c) 2011, SMB SAAS Systems Inc. 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 SMB SAAS Systems Inc. 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.Linq; +using System.Web; +using System.Web.Services; +using System.Data; + +namespace WebsitePanel.WebSite.Services +{ + /// + /// Summary description for InstallerService_Beta + /// + [WebService(Namespace = "http://websitepanel.net/services")] + [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] + [System.ComponentModel.ToolboxItem(false)] + // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. + // [System.Web.Script.Services.ScriptService] + public class InstallerService_20 : InstallerServiceBase + { + public InstallerService_20() + { + RELEASES_FEED_PATH = "~/Data/ProductReleasesFeed-2.0.xml"; + } + } +} diff --git a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Services/InstallerService-2.1.asmx b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Services/InstallerService-2.1.asmx new file mode 100644 index 00000000..f6ad065a --- /dev/null +++ b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Services/InstallerService-2.1.asmx @@ -0,0 +1 @@ +<%@ WebService Language="C#" CodeBehind="InstallerService-2.1.asmx.cs" Class="WebsitePanel.WebSite.Services.InstallerService_21" %> diff --git a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Services/InstallerService-2.1.asmx.cs b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Services/InstallerService-2.1.asmx.cs new file mode 100644 index 00000000..3d4e21f7 --- /dev/null +++ b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Services/InstallerService-2.1.asmx.cs @@ -0,0 +1,53 @@ +/* Copyright (c) 2011, SMB SAAS Systems Inc. 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 SMB SAAS Systems Inc. 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.Linq; +using System.Web; +using System.Web.Services; +using System.Data; + +namespace WebsitePanel.WebSite.Services +{ + /// + /// Summary description for InstallerService_Beta + /// + [WebService(Namespace = "http://websitepanel.net/services")] + [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] + [System.ComponentModel.ToolboxItem(false)] + // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. + // [System.Web.Script.Services.ScriptService] + public class InstallerService_21 : InstallerServiceBase + { + public InstallerService_21() + { + RELEASES_FEED_PATH = "~/Data/ProductReleasesFeed-2.1.xml"; + } + } +} diff --git a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/WebsitePanel.WebSite.csproj b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/WebsitePanel.WebSite.csproj index 66b01697..f55d3643 100644 --- a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/WebsitePanel.WebSite.csproj +++ b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/WebsitePanel.WebSite.csproj @@ -77,6 +77,8 @@ Designer + + @@ -86,6 +88,12 @@ + + InstallerService-2.1.asmx + + + InstallerService-2.0.asmx + InstallerService-Staging.asmx 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) { 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) 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..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; @@ -213,6 +241,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 +285,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..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. // @@ -165,6 +193,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. /// 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()