From b424c73762b194dbc7f25fb1667263e2bbae2632 Mon Sep 17 00:00:00 2001 From: robvde Date: Tue, 25 Sep 2012 14:02:51 +0400 Subject: [PATCH 01/10] Fixed: Ensure users are not able to update their subscriber number themselves --- .../WebsitePanel/UserAccountEditDetails.ascx | 2 +- .../WebsitePanel/UserAccountEditDetails.ascx.cs | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserAccountEditDetails.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserAccountEditDetails.ascx index b95fece1..e4cf120b 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserAccountEditDetails.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserAccountEditDetails.ascx @@ -41,7 +41,7 @@ - + diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserAccountEditDetails.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserAccountEditDetails.ascx.cs index f669dfe6..8c722720 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserAccountEditDetails.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserAccountEditDetails.ascx.cs @@ -43,6 +43,13 @@ namespace WebsitePanel.Portal if (PortalUtils.GetHideDemoCheckbox()) rowDemo.Visible = false; } + + if (PanelSecurity.LoggedUser.Role == UserRole.User) + { + txtSubscriberNumber.ReadOnly = true; + } + + } private void BindUser() From 5f635a637c61d8220a58a321b67fe280721c9f4f Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Tue, 25 Sep 2012 10:49:52 -0400 Subject: [PATCH 02/10] Added tag build-2.0.0.61 for changeset f2bacce13655 From d082df22c8e852b40c3b26ce7f0343730fa1429b Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Tue, 25 Sep 2012 11:05:40 -0400 Subject: [PATCH 03/10] Added tag build-2.0.0.62 for changeset 718aa0f99591 From 77f535576e53b5a2bd294ac8b204a00111d89603 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Tue, 25 Sep 2012 12:05:14 -0400 Subject: [PATCH 04/10] Add Manual-Update.zip to Deploy in Build.xml --- WebsitePanel/build.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/WebsitePanel/build.xml b/WebsitePanel/build.xml index b7232d9a..9501aa64 100644 --- a/WebsitePanel/build.xml +++ b/WebsitePanel/build.xml @@ -571,6 +571,7 @@ + From 440accae440a60b8adee4822f5107594e6230bc3 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Tue, 25 Sep 2012 12:14:31 -0400 Subject: [PATCH 05/10] Added tag build-2.0.0.63 for changeset 8bec96c28ae7 From a187888c05ff0bc0680277e396c0550d26749a45 Mon Sep 17 00:00:00 2001 From: feodor_fitsner Date: Tue, 25 Sep 2012 16:54:03 -0700 Subject: [PATCH 06/10] Updated 2.0 portal upgrade code to make it idempotent --- .../WebsitePanel.Setup/EnterpriseServer20.cs | 2 +- .../Sources/WebsitePanel.Setup/Portal20.cs | 2 +- .../Sources/WebsitePanel.Setup/Server20.cs | 2 +- .../Wizard/ExpressInstallPage.cs | 18 +++++++++++------- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/EnterpriseServer20.cs b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/EnterpriseServer20.cs index c8df0677..3f238133 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/EnterpriseServer20.cs +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/EnterpriseServer20.cs @@ -31,7 +31,7 @@ namespace WebsitePanel.Setup { return UpdateBase(obj, minimalInstallerVersion: "2.0.0", - versionToUpgrade: "1.2.1", + versionToUpgrade: "1.2.1,2.0.0", updateSql: true); } } diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Portal20.cs b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Portal20.cs index 2187ba95..ea1728ae 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Portal20.cs +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Portal20.cs @@ -31,7 +31,7 @@ namespace WebsitePanel.Setup { return UpdateBase(obj, minimalInstallerVersion: "2.0.0", - versionsToUpgrade: "1.2.1", + versionsToUpgrade: "1.2.1,2.0.0", updateSql: false, versionSpecificAction: new InstallAction(ActionTypes.ConfigureSecureSessionModuleInWebConfig)); } diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Server20.cs b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Server20.cs index 9f0a7988..105c8534 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Server20.cs +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Server20.cs @@ -30,7 +30,7 @@ namespace WebsitePanel.Setup { return Server.UpdateBase(obj, minimalInstallerVersion: "2.0.0", - versionToUpgrade: "1.2.1", + versionToUpgrade: "1.2.1,2.0.0", updateSql: false); } } diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Wizard/ExpressInstallPage.cs b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Wizard/ExpressInstallPage.cs index 2542406b..bb0c5e24 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Wizard/ExpressInstallPage.cs +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Wizard/ExpressInstallPage.cs @@ -325,12 +325,16 @@ namespace WebsitePanel.Setup if (webServer != null) { - var modules = doc.CreateElement(iis6 ? "httpModules" : "modules"); - webServer.AppendChild(modules); - var sessionModule = doc.CreateElement("add"); - sessionModule.SetAttribute("name", "SecureSession"); - sessionModule.SetAttribute("type", "WebsitePanel.WebPortal.SecureSessionModule"); - modules.AppendChild(sessionModule); + string modulesNodeName = iis6 ? "httpModules" : "modules"; + if (webServer.SelectSingleNode(modulesNodeName + "/add[@name='SecureSession']") == null) + { + var modules = doc.CreateElement(modulesNodeName); + webServer.AppendChild(modules); + var sessionModule = doc.CreateElement("add"); + sessionModule.SetAttribute("name", "SecureSession"); + sessionModule.SetAttribute("type", "WebsitePanel.WebPortal.SecureSessionModule"); + modules.AppendChild(sessionModule); + } } // update /system.web/httpRuntime element @@ -343,7 +347,7 @@ namespace WebsitePanel.Setup // // var appSettings = doc.SelectSingleNode("configuration/appSettings"); - if (appSettings != null) + if (appSettings != null && appSettings.SelectSingleNode("add[@key='SessionValidationKey']") == null) { var sessionKey = doc.CreateElement("add"); sessionKey.SetAttribute("key", "SessionValidationKey"); From c8a41d912f9a6e1bdd7731fbc322d8b92b14a2a7 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Tue, 25 Sep 2012 20:04:58 -0400 Subject: [PATCH 07/10] Added tag build-2.0.0.64 for changeset cac4f395bc92 From b04e862a86eef6488e1268880b129b8b92f8ec8e Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Tue, 25 Sep 2012 23:11:05 -0400 Subject: [PATCH 08/10] Added tag build-2.0.0.65 for changeset 831304fb0028 From 21e91d29319d3f35b56cbd3fdff60d6430dd185d Mon Sep 17 00:00:00 2001 From: feodor_fitsner Date: Wed, 26 Sep 2012 10:24:01 -0700 Subject: [PATCH 09/10] Incorrect displaying of shared/dedicated IP on website details screen. --- .../Code/WebServers/WebServerController.cs | 17 ++++++++++++----- .../WebsitePanel.Providers.Base/Web/WebSite.cs | 7 +++++++ .../WebsitePanel/WebSitesEditSite.ascx.cs | 8 +++----- 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/WebServers/WebServerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/WebServers/WebServerController.cs index 8cb32b80..4cde88c0 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/WebServers/WebServerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/WebServers/WebServerController.cs @@ -133,6 +133,18 @@ namespace WebsitePanel.EnterpriseServer if(ip != null) site.SiteIPAddress = ip.ExternalIP; + // check if site has dedicated IP assigned + var siteIpAddresses = ServerController.GetItemIPAddresses(siteItemId, IPAddressPool.None); + foreach (var siteIp in siteIpAddresses) + { + var packageIpAddress = ServerController.GetPackageIPAddress(siteIp.AddressID); + if (packageIpAddress != null && packageIpAddress.ExternalIP == site.SiteIPAddress) + { + site.IsDedicatedIP = true; + break; + } + } + // truncate home folder site.ContentPath = FilesController.GetVirtualPackagePath(siteItem.PackageId, site.ContentPath); @@ -654,8 +666,6 @@ namespace WebsitePanel.EnterpriseServer { TaskManager.CompleteTask(); } - - return 0; } public static int SwitchWebSiteToSharedIP(int siteItemId) @@ -717,9 +727,6 @@ namespace WebsitePanel.EnterpriseServer { TaskManager.CompleteTask(); } - - return 0; - } private static void FillWebServerBindings(List bindings, List dnsRecords, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Web/WebSite.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Web/WebSite.cs index e80b2f1a..f55588ea 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Web/WebSite.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Web/WebSite.cs @@ -47,6 +47,7 @@ namespace WebsitePanel.Providers.Web private string siteId; private string siteIPAddress; private int siteIPAddressId; + private bool isDedicatedIP; private string dataPath; private ServerBinding[] bindings; private bool frontPageAvailable; @@ -85,6 +86,12 @@ namespace WebsitePanel.Providers.Web set { siteIPAddressId = value; } } + public bool IsDedicatedIP + { + get { return isDedicatedIP; } + set { isDedicatedIP = value; } + } + /// /// Gets or sets logs path for the web site /// diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesEditSite.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesEditSite.ascx.cs index af5f5e12..410a4f54 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesEditSite.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesEditSite.ascx.cs @@ -176,15 +176,13 @@ namespace WebsitePanel.Portal ddlIpAddresses.Items.Add(new ListItem(fullIP, ip.PackageAddressID.ToString())); } - bool isDedicatedIP = false; - if (!String.IsNullOrEmpty(site.SiteIPAddress)) + if (site.IsDedicatedIP) { litIPAddress.Text = site.SiteIPAddress; - isDedicatedIP = true; } - dedicatedIP.Visible = isDedicatedIP; - sharedIP.Visible = !isDedicatedIP; + dedicatedIP.Visible = site.IsDedicatedIP; + sharedIP.Visible = !site.IsDedicatedIP; cmdSwitchToDedicatedIP.Visible = (ddlIpAddresses.Items.Count > 0); From 5baf5b94979a493a3603dabab24fe3d7412b8d5f Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Wed, 26 Sep 2012 13:44:27 -0400 Subject: [PATCH 10/10] Added tag build-2.0.0.66 for changeset c89b7776e460