remove localhost-only requirement for post upgrade maintenance

This commit is contained in:
Gary Sharp
2023-11-09 13:43:51 +11:00
parent 7b6a44921d
commit 028d1ccc64
2 changed files with 3 additions and 18 deletions
-15
View File
@@ -1,6 +1,4 @@
using Disco.Services.Plugins;
using System;
using System.Configuration;
using System.Web.Mvc;
namespace Disco.Web.Controllers
@@ -8,19 +6,6 @@ namespace Disco.Web.Controllers
[OutputCache(Duration = 0, Location = System.Web.UI.OutputCacheLocation.None)]
public partial class UpdateController : Controller
{
protected override void OnActionExecuting(ActionExecutingContext filterContext)
{
if (!Request.IsLocal && !InitialConfigController.ServerIsCoreSKU.Value && !("true".Equals(ConfigurationManager.AppSettings["DiscoIgnoreVersionUpdate"], StringComparison.OrdinalIgnoreCase)))
{
filterContext.Result = new ContentResult()
{
Content = "Maintenance of Disco ICT is only allowed via a localhost connection",
ContentType = "text/plain"
};
}
base.OnActionExecuting(filterContext);
}
public virtual ActionResult Index()
{
var status = UpdatePluginsAfterDiscoUpdateTask.UpdateDiscoPlugins(true);