Fixes sni-related bug where customers and resellers are not allowed to see website properties.
This commit is contained in:
parent
94d79fefd4
commit
750587f38d
4 changed files with 16 additions and 9 deletions
|
@ -63,6 +63,7 @@ namespace WebsitePanel.Providers.Web
|
|||
private bool heliconApeInstalled;
|
||||
private bool heliconApeEnabled;
|
||||
private HeliconApeStatus heliconApeStatus;
|
||||
private bool sniEnabled;
|
||||
|
||||
public WebSite()
|
||||
{
|
||||
|
@ -187,6 +188,12 @@ namespace WebsitePanel.Providers.Web
|
|||
get { return this.heliconApeStatus; }
|
||||
set { this.heliconApeStatus = value; }
|
||||
}
|
||||
|
||||
public bool SniEnabled
|
||||
{
|
||||
get { return this.sniEnabled; }
|
||||
set { this.sniEnabled = value; }
|
||||
}
|
||||
}
|
||||
|
||||
[Flags]
|
||||
|
|
|
@ -1240,6 +1240,7 @@ namespace WebsitePanel.Providers.Web
|
|||
//
|
||||
site.SiteState = GetSiteState(srvman, siteId);
|
||||
//
|
||||
site.SniEnabled = false;
|
||||
}
|
||||
return site;
|
||||
}
|
||||
|
|
|
@ -182,5 +182,12 @@ namespace WebsitePanel.Providers.Web
|
|||
|
||||
return sslObjectService.InstallCertificate(certificate, website);
|
||||
}
|
||||
|
||||
public override WebSite GetSite(string siteId)
|
||||
{
|
||||
var site = base.GetSite(siteId);
|
||||
site.SniEnabled = UseSni;
|
||||
return site;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -278,15 +278,7 @@ namespace WebsitePanel.Portal
|
|||
webSitesHeliconZooControl.BindWebItem(site);
|
||||
|
||||
// If SNI is enabled on the server, we do allow for SSL even if site not has dedicated Ip
|
||||
var sniEnabled = false;
|
||||
var serverSettings = ES.Services.Servers.GetServiceSettings(site.ServiceId);
|
||||
var sniEnabledItem = serverSettings.FirstOrDefault(s => s.StartsWith("sslusesni"));
|
||||
if (sniEnabledItem != null)
|
||||
{
|
||||
sniEnabled = Utils.ParseBool(sniEnabledItem.Split('=')[1], false);
|
||||
}
|
||||
|
||||
if (site.IsDedicatedIP || sniEnabled)
|
||||
if (site.IsDedicatedIP || site.SniEnabled)
|
||||
{
|
||||
AllowSsl = true;
|
||||
WebsitesSSLControl.Visible = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue