From b4a760f6eca8f90f9f87d8b581b82991d40c485e Mon Sep 17 00:00:00 2001 From: robvde Date: Sat, 13 Oct 2012 10:54:24 +0400 Subject: [PATCH] Added: WebHosting: Moved hostname support enablement to hosting plan to enable closer compatibility with legacy approach. Default hostname set within webpolicy settings --- WebsitePanel/Database/update_db.sql | 11 ++++- .../Packages/Quotas.cs | 3 +- .../WebsitePanel.EnterpriseServer/Web.config | 4 +- .../WebsitePanel_SharedResources.ascx.resx | 3 ++ .../DomainsAddDomain.ascx.resx | 7 ++- .../SettingsWebPolicy.ascx.resx | 6 +++ .../WebSitesAddPointer.ascx.resx | 3 ++ .../WebSitesAddSite.ascx.resx | 3 ++ .../WebsitePanel/Code/Framework/Utils.cs | 8 ++++ .../WebsitePanel/DomainsAddDomain.ascx | 22 +++++++-- .../WebsitePanel/DomainsAddDomain.ascx.cs | 16 ++++++- .../DomainsAddDomain.ascx.designer.cs | 46 ++++++++----------- .../WebsitePanel/SettingsWebPolicy.ascx | 13 ++++++ .../WebsitePanel/SettingsWebPolicy.ascx.cs | 5 ++ .../SettingsWebPolicy.ascx.designer.cs | 36 +++++++++++++++ .../WebsitePanel/UserCreateSpace.ascx | 7 +++ .../WebsitePanel/UserCreateSpace.ascx.cs | 17 ++++++- .../UserCreateSpace.ascx.designer.cs | 18 ++++++++ .../WebsitePanel/WebSitesAddPointer.ascx | 2 +- .../WebsitePanel/WebSitesAddPointer.ascx.cs | 15 ++++++ .../WebSitesAddPointer.ascx.designer.cs | 9 ++++ .../WebsitePanel/WebSitesAddSite.ascx | 2 +- .../WebsitePanel/WebSitesAddSite.ascx.cs | 12 +++++ .../WebSitesAddSite.ascx.designer.cs | 9 ++++ 24 files changed, 235 insertions(+), 42 deletions(-) diff --git a/WebsitePanel/Database/update_db.sql b/WebsitePanel/Database/update_db.sql index 6003e329..9e8262f5 100644 --- a/WebsitePanel/Database/update_db.sql +++ b/WebsitePanel/Database/update_db.sql @@ -5904,4 +5904,13 @@ HAVING (COUNT(DomainName) = 1)) DROP TABLE #TempDomains COMMIT TRAN -GO \ No newline at end of file +GO + + + +IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'Web.EnableHostNameSupport') +BEGIN + INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (334, 2, 23, N'Web.EnableHostNameSupport', N'Enable Hostname Support', 1, 0, NULL) +END +GO + diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/Quotas.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/Quotas.cs index e8a6fcc0..8090dd31 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/Quotas.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/Quotas.cs @@ -79,7 +79,8 @@ order by rg.groupOrder public const string WEB_CFVIRTUALDIRS = "Web.CFVirtualDirectories"; //ColdFusion Virtual Directories public const string WEB_REMOTEMANAGEMENT = "Web.RemoteManagement"; //IIS 7 Remote Management public const string WEB_SSL = "Web.SSL"; //SSL - public const string WEB_ALLOWIPADDRESSMODESWITCH = "Web.AllowIPAddressModeSwitch"; //SSL + public const string WEB_ALLOWIPADDRESSMODESWITCH = "Web.AllowIPAddressModeSwitch"; //Allow to switch IP Address Mode + public const string WEB_ENABLEHOSTNAMESUPPORT = "Web.EnableHostNameSupport"; //Enable to specify hostnames upon site creation public const string FTP_ACCOUNTS = "FTP.Accounts"; // FTP Accounts public const string MAIL_ACCOUNTS = "Mail.Accounts"; // Mail Accounts public const string MAIL_FORWARDINGS = "Mail.Forwardings"; // Mail Forwardings diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Web.config b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Web.config index 7d97bfb9..a3bcbce3 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Web.config +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Web.config @@ -9,14 +9,14 @@ --> - + - + 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 0270d53b..d73ac512 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx @@ -4861,6 +4861,9 @@ Allow IP Address Mode Switch + + Enable Hostname Support + Exchange Organization diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/DomainsAddDomain.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/DomainsAddDomain.ascx.resx index 1562d814..537240f1 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/DomainsAddDomain.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/DomainsAddDomain.ascx.resx @@ -112,10 +112,10 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Allow customer sub-domains @@ -180,4 +180,7 @@ * + + Hostname: + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/SettingsWebPolicy.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/SettingsWebPolicy.ascx.resx index 29c96bcf..2085f6f3 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/SettingsWebPolicy.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/SettingsWebPolicy.ascx.resx @@ -219,6 +219,9 @@ Group Name: + + Default Hostname: (Only when hostnames are enabled) + Page Content: @@ -273,6 +276,9 @@ General Settings + + Default Hostname + Parking Page diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/WebSitesAddPointer.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/WebSitesAddPointer.ascx.resx index f4978101..58a71d90 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/WebSitesAddPointer.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/WebSitesAddPointer.ascx.resx @@ -126,4 +126,7 @@ Web Site Pointer: + + . + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/WebSitesAddSite.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/WebSitesAddSite.ascx.resx index fd1eabe9..680b7606 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/WebSitesAddSite.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/WebSitesAddSite.ascx.resx @@ -144,6 +144,9 @@ Note: A Zone Template is often defined by your host and contains additional Web Site Pointers to create when creating a new Web Site. Static record definitions such as 'www' conflicts when creating an additional Web Site in the same Domain. + + . + Dedicated diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Code/Framework/Utils.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Code/Framework/Utils.cs index d5e2f0ce..5fd549f7 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Code/Framework/Utils.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Code/Framework/Utils.cs @@ -295,5 +295,13 @@ namespace WebsitePanel.Portal (cntx.Quotas[key].QuotaTypeId != 1 && (cntx.Quotas[key].QuotaAllocatedValue > 0 || cntx.Quotas[key].QuotaAllocatedValue == -1))); } + + public static bool CheckQouta(string key, HostingPlanContext cntx) + { + return cntx.Quotas.ContainsKey(key) && + ((cntx.Quotas[key].QuotaAllocatedValue == 1 && cntx.Quotas[key].QuotaTypeId == 1) || + (cntx.Quotas[key].QuotaTypeId != 1 && (cntx.Quotas[key].QuotaAllocatedValue > 0 || cntx.Quotas[key].QuotaAllocatedValue == -1))); + } + } } \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsAddDomain.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsAddDomain.ascx index 9fc7ade2..f99eeaa6 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsAddDomain.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsAddDomain.ascx @@ -1,5 +1,6 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="DomainsAddDomain.ascx.cs" Inherits="WebsitePanel.Portal.DomainsAddDomain" %> <%@ Register Src="UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %> +<%@ Register Src="DomainsSelectDomainControl.ascx" TagName="DomainsSelectDomainControl" TagPrefix="uc1" %> <%@ Register Src="UserControls/CollapsiblePanel.ascx" TagPrefix="wsp" TagName="CollapsiblePanel" %> @@ -35,10 +36,23 @@
-
-
- Description... -
+ + + + + + + + +
+
+
+ Description... +
+
+ + +
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsAddDomain.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsAddDomain.ascx.cs index 39d42feb..89a62ceb 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsAddDomain.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsAddDomain.ascx.cs @@ -41,6 +41,20 @@ namespace WebsitePanel.Portal { // bind controls BindControls(); + + PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId); + + if (Utils.CheckQouta(Quotas.WEB_ENABLEHOSTNAMESUPPORT, cntx)) + { + lblHostName.Visible = txtHostName.Visible = true; + UserSettings settings = ES.Services.Users.GetUserSettings(PanelSecurity.LoggedUserId, UserSettings.WEB_POLICY); + txtHostName.Text = String.IsNullOrEmpty(settings["HostName"]) ? "" : settings["HostName"]; + } + else + lblHostName.Visible= txtHostName.Visible = false; + + + } catch (Exception ex) { @@ -179,7 +193,7 @@ namespace WebsitePanel.Portal { domainId = ES.Services.Servers.AddDomainWithProvisioning(PanelSecurity.PackageId, domainName.ToLower(), type, CreateWebSite.Checked, pointWebSiteId, pointMailDomainId, - EnableDns.Checked, CreateInstantAlias.Checked, AllowSubDomains.Checked, ""); + EnableDns.Checked, CreateInstantAlias.Checked, AllowSubDomains.Checked, txtHostName.Text); if (domainId < 0) { diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsAddDomain.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsAddDomain.ascx.designer.cs index 12fa4ca9..bfd6a8b4 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsAddDomain.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsAddDomain.ascx.designer.cs @@ -1,31 +1,3 @@ -// 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. @@ -184,6 +156,24 @@ namespace WebsitePanel.Portal { /// protected global::System.Web.UI.WebControls.Localize DescribeCreateWebSite; + /// + /// lblHostName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblHostName; + + /// + /// txtHostName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtHostName; + /// /// PointMailDomainPanel control. /// diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsWebPolicy.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsWebPolicy.ascx index da64e4be..78d35a1b 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsWebPolicy.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsWebPolicy.ascx @@ -28,6 +28,19 @@ + + + + + + + +
+
+
+ + diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsWebPolicy.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsWebPolicy.ascx.cs index 7ba14fd0..73fdb051 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsWebPolicy.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsWebPolicy.ascx.cs @@ -52,6 +52,9 @@ namespace WebsitePanel.Portal PublishingProfileTextBox.Text = settings["PublishingProfile"]; chkEnableParkingPageTokens.Checked = Utils.ParseBool(settings["EnableParkingPageTokens"], false); + // HostName + txtHostName.Text = settings["HostName"]; + // default documents if (!String.IsNullOrEmpty(settings["DefaultDocuments"])) txtDefaultDocs.Text = String.Join("\n", settings["DefaultDocuments"].Split(',', ';')); @@ -105,6 +108,8 @@ namespace WebsitePanel.Portal settings["PublishingProfile"] = PublishingProfileTextBox.Text; settings["EnableParkingPageTokens"] = chkEnableParkingPageTokens.Checked.ToString(); + settings["HostName"] = txtHostName.Text.Trim(); + // default documents settings["DefaultDocuments"] = String.Join(",", Utils.ParseDelimitedString(txtDefaultDocs.Text, '\n', '\r', ';', ',')); ; diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsWebPolicy.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsWebPolicy.ascx.designer.cs index 117307fc..79dd695c 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsWebPolicy.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsWebPolicy.ascx.designer.cs @@ -84,6 +84,42 @@ namespace WebsitePanel.Portal { /// protected global::System.Web.UI.WebControls.CheckBox chkEnableParkingPageTokens; + /// + /// secHostNamePanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.CollapsiblePanel secHostNamePanel; + + /// + /// HostNamePanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel HostNamePanel; + + /// + /// lblHostName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblHostName; + + /// + /// txtHostName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtHostName; + /// /// WebPublishingProfile control. /// diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserCreateSpace.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserCreateSpace.ascx index 8a538579..52e6606c 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserCreateSpace.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserCreateSpace.ascx @@ -1,6 +1,7 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UserCreateSpace.ascx.cs" Inherits="WebsitePanel.Portal.UserCreateSpace" %> <%@ Register TagPrefix="wsp" TagName="CollapsiblePanel" Src="UserControls/CollapsiblePanel.ascx" %> <%@ Register Src="UserControls/UsernameControl.ascx" TagName="UsernameControl" TagPrefix="uc4" %> +<%@ Register Src="DomainsSelectDomainControl.ascx" TagName="DomainsSelectDomainControl" TagPrefix="uc1" %> <%@ Register Src="UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %> @@ -97,6 +98,12 @@ Text="Create Web Site" Checked="True" /> + + + + + + diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserCreateSpace.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserCreateSpace.ascx.cs index 5bc7b0c6..0888d06f 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserCreateSpace.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserCreateSpace.ascx.cs @@ -44,6 +44,9 @@ namespace WebsitePanel.Portal ftpAccountName.SetUserPolicy(PanelSecurity.SelectedUserId, UserSettings.FTP_POLICY, "UserNamePolicy"); BindHostingPlans(PanelSecurity.SelectedUserId); BindHostingPlan(); + + + } } catch (Exception ex) @@ -92,6 +95,17 @@ namespace WebsitePanel.Portal { systemEnabled = cntx.Groups.ContainsKey(ResourceGroups.Os); webEnabled = cntx.Groups.ContainsKey(ResourceGroups.Web); + + if (Utils.CheckQouta(Quotas.WEB_ENABLEHOSTNAMESUPPORT, cntx)) + { + lblHostName.Visible = txtHostName.Visible = true; + UserSettings settings = ES.Services.Users.GetUserSettings(PanelSecurity.LoggedUserId, UserSettings.WEB_POLICY); + txtHostName.Text = String.IsNullOrEmpty(settings["HostName"]) ? "" : settings["HostName"]; + + } + else + lblHostName.Visible = txtHostName.Visible = false; + ftpEnabled = cntx.Groups.ContainsKey(ResourceGroups.Ftp); mailEnabled = cntx.Groups.ContainsKey(ResourceGroups.Mail); } @@ -102,6 +116,7 @@ namespace WebsitePanel.Portal fsWeb.Visible = webEnabled; chkCreateWebSite.Checked &= webEnabled; + fsFtp.Visible = ftpEnabled; chkCreateFtpAccount.Checked &= ftpEnabled; @@ -134,7 +149,7 @@ namespace WebsitePanel.Portal Utils.ParseInt(ddlStatus.SelectedValue, 0), chkPackageLetter.Checked, chkCreateResources.Checked, domainName, false, chkCreateWebSite.Checked, - chkCreateFtpAccount.Checked, ftpAccount, chkCreateMailAccount.Checked, ""); + chkCreateFtpAccount.Checked, ftpAccount, chkCreateMailAccount.Checked, txtHostName.Text); if (result.Result < 0) { diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserCreateSpace.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserCreateSpace.ascx.designer.cs index e41d8992..1429ed53 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserCreateSpace.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserCreateSpace.ascx.designer.cs @@ -210,6 +210,24 @@ namespace WebsitePanel.Portal { /// protected global::System.Web.UI.WebControls.CheckBox chkCreateWebSite; + /// + /// lblHostName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblHostName; + + /// + /// txtHostName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtHostName; + /// /// fsFtp control. /// diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesAddPointer.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesAddPointer.ascx index 4acbd503..78691c8e 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesAddPointer.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesAddPointer.ascx @@ -7,7 +7,7 @@ - . + protected global::System.Web.UI.WebControls.TextBox txtHostName; + /// + /// lblTheDotInTheMiddle control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblTheDotInTheMiddle; + /// /// domainsSelectDomainControl control. /// diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesAddSite.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesAddSite.ascx index 3dffe364..7c973b98 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesAddSite.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesAddSite.ascx @@ -11,7 +11,7 @@ - . + protected global::System.Web.UI.WebControls.TextBox txtHostName; + /// + /// lblTheDotInTheMiddle control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblTheDotInTheMiddle; + /// /// domainsSelectDomainControl control. ///