Allow remote maintenance via web.config setting
This commit is contained in:
@@ -5,6 +5,7 @@ using Disco.Services.Users;
|
||||
using Disco.Web.Areas.API.Models.Shared;
|
||||
using Disco.Web.Models.InitialConfig;
|
||||
using System;
|
||||
using System.Configuration;
|
||||
using System.Data.SqlClient;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
@@ -64,7 +65,7 @@ namespace Disco.Web.Controllers
|
||||
|
||||
protected override void OnActionExecuting(ActionExecutingContext filterContext)
|
||||
{
|
||||
if (!Request.IsLocal && !ServerIsCoreSKU.Value)
|
||||
if (!Request.IsLocal && !ServerIsCoreSKU.Value && !("true".Equals(ConfigurationManager.AppSettings["DiscoAllowRemoteMaintenance"], StringComparison.OrdinalIgnoreCase)))
|
||||
{
|
||||
filterContext.Result = new ContentResult() {
|
||||
Content = "Initial Configuration of Disco ICT is only allowed via a localhost connection",
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using Disco.Services.Plugins;
|
||||
using System;
|
||||
using System.Configuration;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace Disco.Web.Controllers
|
||||
@@ -8,7 +10,7 @@ namespace Disco.Web.Controllers
|
||||
{
|
||||
protected override void OnActionExecuting(ActionExecutingContext filterContext)
|
||||
{
|
||||
if (!Request.IsLocal && !InitialConfigController.ServerIsCoreSKU.Value)
|
||||
if (!Request.IsLocal && !InitialConfigController.ServerIsCoreSKU.Value && !("true".Equals(ConfigurationManager.AppSettings["DiscoIgnoreVersionUpdate"], StringComparison.OrdinalIgnoreCase)))
|
||||
{
|
||||
filterContext.Result = new ContentResult()
|
||||
{
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
<connectionStrings xdt:Transform="Remove" />
|
||||
<appSettings>
|
||||
<add key="DiscoIgnoreVersionUpdate" xdt:Transform="Remove" xdt:Locator="Match(key)" />
|
||||
<add key="DiscoAllowRemoteMaintenance" xdt:Transform="Remove" xdt:Locator="Match(key)" />
|
||||
</appSettings>
|
||||
<system.web>
|
||||
<compilation xdt:Transform="RemoveAttributes(debug)" />
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
<add key="ClientValidationEnabled" value="true" />
|
||||
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
|
||||
<add key="DiscoIgnoreVersionUpdate" value="true" />
|
||||
<add key="DiscoAllowRemoteMaintenance" value="true" />
|
||||
<add key="Microsoft.VisualStudio.Enterprise.AspNetHelper.VsInstrLocation" value="C:\Program Files (x86)\Microsoft Visual Studio 11.0\Team Tools\Performance Tools\x64\vsinstr.exe" />
|
||||
</appSettings>
|
||||
<connectionStrings>
|
||||
|
||||
Reference in New Issue
Block a user