Honor Web Policy for ColdFusion
This commit is contained in:
parent
3d6f6fc7a2
commit
ed94701e7c
7 changed files with 83 additions and 3 deletions
|
@ -381,7 +381,10 @@ namespace WebsitePanel.EnterpriseServer
|
|||
site.PerlInstalled = Utils.ParseBool(webPolicy["PerlInstalled"], false);
|
||||
site.PythonInstalled = Utils.ParseBool(webPolicy["PythonInstalled"], false);
|
||||
site.CgiBinInstalled = Utils.ParseBool(webPolicy["CgiBinInstalled"], false);
|
||||
site.ColdFusionInstalled = false;
|
||||
QuotaValueInfo quotaInfoCF = PackageController.GetPackageQuota(packageId, Quotas.WEB_COLDFUSION);
|
||||
site.ColdFusionInstalled = (quotaInfoCF.QuotaAllocatedValue > 0) && Utils.ParseBool(webPolicy["ColdFusionInstalled"], false);
|
||||
QuotaValueInfo quotaInfoCFV = PackageController.GetPackageQuota(packageId, Quotas.WEB_CFVIRTUALDIRS);
|
||||
site.CreateCFVirtualDirectoriesPol = (quotaInfoCFV.QuotaAllocatedValue > 0) && Utils.ParseBool(webPolicy["CreateCFVirtualDirectoriesPol"], false);
|
||||
|
||||
}
|
||||
else
|
||||
|
@ -404,6 +407,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
site.PythonInstalled = false;
|
||||
site.CgiBinInstalled = false;
|
||||
site.ColdFusionInstalled = false;
|
||||
site.CreateCFVirtualDirectoriesPol = false;
|
||||
}
|
||||
|
||||
site.HttpRedirect = "";
|
||||
|
|
|
@ -380,7 +380,10 @@ namespace WebsitePanel.EnterpriseServer
|
|||
site.PerlInstalled = Utils.ParseBool(webPolicy["PerlInstalled"], false);
|
||||
site.PythonInstalled = Utils.ParseBool(webPolicy["PythonInstalled"], false);
|
||||
site.CgiBinInstalled = Utils.ParseBool(webPolicy["CgiBinInstalled"], false);
|
||||
site.ColdFusionInstalled = false;
|
||||
QuotaValueInfo quotaInfoCF = PackageController.GetPackageQuota(packageId, Quotas.WEB_COLDFUSION);
|
||||
site.ColdFusionInstalled = (quotaInfoCF.QuotaAllocatedValue > 0) && Utils.ParseBool(webPolicy["ColdFusionInstalled"], false);
|
||||
QuotaValueInfo quotaInfoCFV = PackageController.GetPackageQuota(packageId, Quotas.WEB_CFVIRTUALDIRS);
|
||||
site.CreateCFVirtualDirectoriesPol = (quotaInfoCFV.QuotaAllocatedValue > 0) && Utils.ParseBool(webPolicy["CreateCFVirtualDirectoriesPol"], false);
|
||||
|
||||
}
|
||||
else
|
||||
|
@ -403,6 +406,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
site.PythonInstalled = false;
|
||||
site.CgiBinInstalled = false;
|
||||
site.ColdFusionInstalled = false;
|
||||
site.CreateCFVirtualDirectoriesPol = false;
|
||||
}
|
||||
|
||||
site.HttpRedirect = "";
|
||||
|
|
|
@ -55,6 +55,7 @@ namespace WebsitePanel.Providers.Web
|
|||
private bool frontPageInstalled;
|
||||
private bool coldFusionAvailable;
|
||||
private bool createCFVirtualDirectories;
|
||||
private bool createCFVirtualDirectoriesPol;
|
||||
private string frontPageAccount;
|
||||
private string frontPagePassword;
|
||||
private string coldFusionVersion;
|
||||
|
@ -158,6 +159,12 @@ namespace WebsitePanel.Providers.Web
|
|||
set { this.createCFVirtualDirectories = value; }
|
||||
}
|
||||
|
||||
public bool CreateCFVirtualDirectoriesPol
|
||||
{
|
||||
get { return this.createCFVirtualDirectoriesPol; }
|
||||
set { this.createCFVirtualDirectoriesPol = value; }
|
||||
}
|
||||
|
||||
public ServerState SiteState
|
||||
{
|
||||
get { return this.siteState; }
|
||||
|
|
|
@ -1349,6 +1349,11 @@ namespace WebsitePanel.Providers.Web
|
|||
//
|
||||
UpdateCgiBinFolder(site);
|
||||
//
|
||||
if (site.CreateCFVirtualDirectoriesPol)
|
||||
{
|
||||
//Create CFVirtDirs if enabled in hosting plan, this allows for CF to be enbled via Web Policy
|
||||
CreateCFVirtualDirectories(site.SiteId);
|
||||
}
|
||||
try
|
||||
{
|
||||
webObjectsSvc.ChangeSiteState(site.SiteId, ServerState.Started);
|
||||
|
@ -1448,6 +1453,7 @@ namespace WebsitePanel.Providers.Web
|
|||
{
|
||||
DeleteCFVirtualDirectories(site.SiteId);
|
||||
site.CreateCFVirtualDirectories = false;
|
||||
site.CreateCFVirtualDirectoriesPol = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1457,6 +1463,7 @@ namespace WebsitePanel.Providers.Web
|
|||
{
|
||||
DeleteCFVirtualDirectories(site.SiteId);
|
||||
site.CreateCFVirtualDirectories = false;
|
||||
site.CreateCFVirtualDirectoriesPol = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -1465,6 +1472,7 @@ namespace WebsitePanel.Providers.Web
|
|||
{
|
||||
CreateCFVirtualDirectories(site.SiteId);
|
||||
site.CreateCFVirtualDirectories = true;
|
||||
site.CreateCFVirtualDirectoriesPol = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -181,6 +181,23 @@
|
|||
<td class="Normal">
|
||||
<asp:CheckBox ID="chkCgiBin" runat="server" Text="Installed" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="SubHead">
|
||||
<asp:Label ID="lblCfExt" runat="server" meta:resourcekey="lblCfExt" Text="ColdFusion:"></asp:Label>
|
||||
</td>
|
||||
<td class="Normal">
|
||||
<asp:CheckBox ID="chkCfExt" runat="server" Text="Enabled" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="SubHead">
|
||||
<asp:Label ID="lblVirtDir" runat="server" meta:resourcekey="lblVirtDir" Text="CFVirtualDirectories:"></asp:Label>
|
||||
</td>
|
||||
<td class="Normal">
|
||||
<asp:CheckBox ID="chkVirtDir" runat="server" Text="Enabled" /></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</asp:Panel>
|
||||
|
||||
|
|
|
@ -76,6 +76,8 @@ namespace WebsitePanel.Portal
|
|||
chkPerl.Checked = Utils.ParseBool(settings["PerlInstalled"], false);
|
||||
chkPython.Checked = Utils.ParseBool(settings["PythonInstalled"], false);
|
||||
chkCgiBin.Checked = Utils.ParseBool(settings["CgiBinInstalled"], false);
|
||||
chkCfExt.Checked = Utils.ParseBool(settings["ColdFusionInstalled"], false);
|
||||
chkVirtDir.Checked = Utils.ParseBool(settings["CreateCFVirtualDirectoriesPol"], false);
|
||||
|
||||
// anonymous account policy
|
||||
anonymousUsername.Value = settings["AnonymousAccountPolicy"];
|
||||
|
@ -130,6 +132,8 @@ namespace WebsitePanel.Portal
|
|||
settings["PerlInstalled"] = chkPerl.Checked.ToString();
|
||||
settings["PythonInstalled"] = chkPython.Checked.ToString();
|
||||
settings["CgiBinInstalled"] = chkCgiBin.Checked.ToString();
|
||||
settings["ColdFusionInstalled"] = chkCfExt.Checked.ToString();
|
||||
settings["CreateCFVirtualDirectoriesPol"] = chkVirtDir.Checked.ToString();
|
||||
|
||||
// anonymous account policy
|
||||
settings["AnonymousAccountPolicy"] = anonymousUsername.Value;
|
||||
|
|
|
@ -463,6 +463,42 @@ namespace WebsitePanel.Portal {
|
|||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox chkCgiBin;
|
||||
|
||||
/// <summary>
|
||||
/// lblCfExt control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblCfExt;
|
||||
|
||||
/// <summary>
|
||||
/// chkCfExt control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox chkCfExt;
|
||||
|
||||
/// <summary>
|
||||
/// lblVirtDir control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblVirtDir;
|
||||
|
||||
/// <summary>
|
||||
/// chkVirtDir control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox chkVirtDir;
|
||||
|
||||
/// <summary>
|
||||
/// secAnonymousAccount control.
|
||||
/// </summary>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue