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:
@ -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);
|
||||
|
Reference in New Issue
Block a user