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.PerlInstalled = Utils.ParseBool(webPolicy["PerlInstalled"], false);
|
||||||
site.PythonInstalled = Utils.ParseBool(webPolicy["PythonInstalled"], false);
|
site.PythonInstalled = Utils.ParseBool(webPolicy["PythonInstalled"], false);
|
||||||
site.CgiBinInstalled = Utils.ParseBool(webPolicy["CgiBinInstalled"], 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
|
else
|
||||||
|
@ -404,6 +407,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
site.PythonInstalled = false;
|
site.PythonInstalled = false;
|
||||||
site.CgiBinInstalled = false;
|
site.CgiBinInstalled = false;
|
||||||
site.ColdFusionInstalled = false;
|
site.ColdFusionInstalled = false;
|
||||||
|
site.CreateCFVirtualDirectoriesPol = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
site.HttpRedirect = "";
|
site.HttpRedirect = "";
|
||||||
|
|
|
@ -380,7 +380,10 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
site.PerlInstalled = Utils.ParseBool(webPolicy["PerlInstalled"], false);
|
site.PerlInstalled = Utils.ParseBool(webPolicy["PerlInstalled"], false);
|
||||||
site.PythonInstalled = Utils.ParseBool(webPolicy["PythonInstalled"], false);
|
site.PythonInstalled = Utils.ParseBool(webPolicy["PythonInstalled"], false);
|
||||||
site.CgiBinInstalled = Utils.ParseBool(webPolicy["CgiBinInstalled"], 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
|
else
|
||||||
|
@ -403,6 +406,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
site.PythonInstalled = false;
|
site.PythonInstalled = false;
|
||||||
site.CgiBinInstalled = false;
|
site.CgiBinInstalled = false;
|
||||||
site.ColdFusionInstalled = false;
|
site.ColdFusionInstalled = false;
|
||||||
|
site.CreateCFVirtualDirectoriesPol = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
site.HttpRedirect = "";
|
site.HttpRedirect = "";
|
||||||
|
|
|
@ -55,6 +55,7 @@ namespace WebsitePanel.Providers.Web
|
||||||
private bool frontPageInstalled;
|
private bool frontPageInstalled;
|
||||||
private bool coldFusionAvailable;
|
private bool coldFusionAvailable;
|
||||||
private bool createCFVirtualDirectories;
|
private bool createCFVirtualDirectories;
|
||||||
|
private bool createCFVirtualDirectoriesPol;
|
||||||
private string frontPageAccount;
|
private string frontPageAccount;
|
||||||
private string frontPagePassword;
|
private string frontPagePassword;
|
||||||
private string coldFusionVersion;
|
private string coldFusionVersion;
|
||||||
|
@ -157,6 +158,12 @@ namespace WebsitePanel.Providers.Web
|
||||||
get { return this.createCFVirtualDirectories; }
|
get { return this.createCFVirtualDirectories; }
|
||||||
set { this.createCFVirtualDirectories = value; }
|
set { this.createCFVirtualDirectories = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool CreateCFVirtualDirectoriesPol
|
||||||
|
{
|
||||||
|
get { return this.createCFVirtualDirectoriesPol; }
|
||||||
|
set { this.createCFVirtualDirectoriesPol = value; }
|
||||||
|
}
|
||||||
|
|
||||||
public ServerState SiteState
|
public ServerState SiteState
|
||||||
{
|
{
|
||||||
|
|
|
@ -1349,6 +1349,11 @@ namespace WebsitePanel.Providers.Web
|
||||||
//
|
//
|
||||||
UpdateCgiBinFolder(site);
|
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
|
try
|
||||||
{
|
{
|
||||||
webObjectsSvc.ChangeSiteState(site.SiteId, ServerState.Started);
|
webObjectsSvc.ChangeSiteState(site.SiteId, ServerState.Started);
|
||||||
|
@ -1357,7 +1362,7 @@ namespace WebsitePanel.Providers.Web
|
||||||
{
|
{
|
||||||
Log.WriteError(ex);
|
Log.WriteError(ex);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
return site.SiteId;
|
return site.SiteId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1448,6 +1453,7 @@ namespace WebsitePanel.Providers.Web
|
||||||
{
|
{
|
||||||
DeleteCFVirtualDirectories(site.SiteId);
|
DeleteCFVirtualDirectories(site.SiteId);
|
||||||
site.CreateCFVirtualDirectories = false;
|
site.CreateCFVirtualDirectories = false;
|
||||||
|
site.CreateCFVirtualDirectoriesPol = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1457,6 +1463,7 @@ namespace WebsitePanel.Providers.Web
|
||||||
{
|
{
|
||||||
DeleteCFVirtualDirectories(site.SiteId);
|
DeleteCFVirtualDirectories(site.SiteId);
|
||||||
site.CreateCFVirtualDirectories = false;
|
site.CreateCFVirtualDirectories = false;
|
||||||
|
site.CreateCFVirtualDirectoriesPol = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1465,6 +1472,7 @@ namespace WebsitePanel.Providers.Web
|
||||||
{
|
{
|
||||||
CreateCFVirtualDirectories(site.SiteId);
|
CreateCFVirtualDirectories(site.SiteId);
|
||||||
site.CreateCFVirtualDirectories = true;
|
site.CreateCFVirtualDirectories = true;
|
||||||
|
site.CreateCFVirtualDirectoriesPol = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -181,6 +181,23 @@
|
||||||
<td class="Normal">
|
<td class="Normal">
|
||||||
<asp:CheckBox ID="chkCgiBin" runat="server" Text="Installed" /></td>
|
<asp:CheckBox ID="chkCgiBin" runat="server" Text="Installed" /></td>
|
||||||
</tr>
|
</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>
|
</table>
|
||||||
</asp:Panel>
|
</asp:Panel>
|
||||||
|
|
||||||
|
|
|
@ -76,6 +76,8 @@ namespace WebsitePanel.Portal
|
||||||
chkPerl.Checked = Utils.ParseBool(settings["PerlInstalled"], false);
|
chkPerl.Checked = Utils.ParseBool(settings["PerlInstalled"], false);
|
||||||
chkPython.Checked = Utils.ParseBool(settings["PythonInstalled"], false);
|
chkPython.Checked = Utils.ParseBool(settings["PythonInstalled"], false);
|
||||||
chkCgiBin.Checked = Utils.ParseBool(settings["CgiBinInstalled"], 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
|
// anonymous account policy
|
||||||
anonymousUsername.Value = settings["AnonymousAccountPolicy"];
|
anonymousUsername.Value = settings["AnonymousAccountPolicy"];
|
||||||
|
@ -130,6 +132,8 @@ namespace WebsitePanel.Portal
|
||||||
settings["PerlInstalled"] = chkPerl.Checked.ToString();
|
settings["PerlInstalled"] = chkPerl.Checked.ToString();
|
||||||
settings["PythonInstalled"] = chkPython.Checked.ToString();
|
settings["PythonInstalled"] = chkPython.Checked.ToString();
|
||||||
settings["CgiBinInstalled"] = chkCgiBin.Checked.ToString();
|
settings["CgiBinInstalled"] = chkCgiBin.Checked.ToString();
|
||||||
|
settings["ColdFusionInstalled"] = chkCfExt.Checked.ToString();
|
||||||
|
settings["CreateCFVirtualDirectoriesPol"] = chkVirtDir.Checked.ToString();
|
||||||
|
|
||||||
// anonymous account policy
|
// anonymous account policy
|
||||||
settings["AnonymousAccountPolicy"] = anonymousUsername.Value;
|
settings["AnonymousAccountPolicy"] = anonymousUsername.Value;
|
||||||
|
|
|
@ -462,6 +462,42 @@ namespace WebsitePanel.Portal {
|
||||||
/// To modify move field declaration from designer file to code-behind file.
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::System.Web.UI.WebControls.CheckBox chkCgiBin;
|
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>
|
/// <summary>
|
||||||
/// secAnonymousAccount control.
|
/// secAnonymousAccount control.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue