1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 23:31:13 -05:00

Finish implementation of configuable command permissions

This commit is contained in:
RaidMax
2020-01-31 20:15:07 -06:00
parent 475ef92917
commit 786eda7937
38 changed files with 373 additions and 213 deletions

View File

@ -1,4 +1,5 @@
using System.IO;
using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
@ -11,15 +12,17 @@ namespace WebfrontCore
public class Program
{
public static IManager Manager;
public static IServiceProvider ApplicationServiceProvider;
static void Main()
{
throw new System.Exception("Webfront core cannot be run as a standalone application");
throw new Exception("Webfront core cannot be run as a standalone application");
}
public static Task Init(IManager mgr, CancellationToken cancellationToken)
public static Task Init(IManager mgr, IServiceProvider existingServiceProvider, CancellationToken cancellationToken)
{
Manager = mgr;
ApplicationServiceProvider = existingServiceProvider;
var config = Manager.GetApplicationSettings().Configuration();
Manager.MiddlewareActionHandler.Register(null, new CustomCssAccentMiddlewareAction("#007ACC", "#fd7e14", config.WebfrontPrimaryColor, config.WebfrontSecondaryColor), "custom_css_accent");
return BuildWebHost().RunAsync(cancellationToken);