From 64d4b1ba301c75e41de4422a5d92731c541f0320 Mon Sep 17 00:00:00 2001 From: robvde Date: Sun, 27 Oct 2013 15:21:58 +0400 Subject: [PATCH] wsp-10204 Fixed: User is unable to create domains when no DNS provider is part of the plan --- .../WebsitePanel/DomainsAddDomain.ascx.cs | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsAddDomain.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsAddDomain.ascx.cs index 5dd7a02b..850330c4 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsAddDomain.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsAddDomain.ascx.cs @@ -56,22 +56,21 @@ namespace WebsitePanel.Portal txtHostName.Text = ""; } + DomainType type = GetDomainType(Request["DomainType"]); - + if ((PanelSecurity.LoggedUser.Role == UserRole.User) & (type != DomainType.SubDomain)) + { + if (cntx.Groups.ContainsKey(ResourceGroups.Dns)) + { + if (!PackagesHelper.CheckGroupQuotaEnabled(PanelSecurity.PackageId, ResourceGroups.Dns, Quotas.DNS_EDITOR)) + this.DisableControls = true; + } + } } catch (Exception ex) { ShowErrorMessage("DOMAIN_GET_DOMAIN", ex); } - - DomainType type = GetDomainType(Request["DomainType"]); - - if ((PanelSecurity.LoggedUser.Role == UserRole.User) & (type != DomainType.SubDomain)) - { - if (!PackagesHelper.CheckGroupQuotaEnabled(PanelSecurity.PackageId, ResourceGroups.Dns, Quotas.DNS_EDITOR)) - this.DisableControls = true; - } - } private void BindControls()