Last change
on this file since 411 was 404, checked in by alloc, 21 months ago |
Latest state including reworking to the permissions system
|
File size:
810 bytes
|
Line | |
---|
1 | using System.Collections.Generic;
|
---|
2 | using HarmonyLib;
|
---|
3 | using JetBrains.Annotations;
|
---|
4 |
|
---|
5 | namespace Webserver.Permissions {
|
---|
6 | [HarmonyPatch(typeof(AdminTools))]
|
---|
7 | [HarmonyPatch("registerModules")]
|
---|
8 | public static class RegisterModules {
|
---|
9 | [UsedImplicitly]
|
---|
10 | private static void Postfix (AdminTools __instance, Dictionary<string, AdminSectionAbs> ___modules) {
|
---|
11 | if (AdminApiTokens.Instance != null) {
|
---|
12 | return;
|
---|
13 | }
|
---|
14 |
|
---|
15 | AdminApiTokens apiTokens = new AdminApiTokens (__instance);
|
---|
16 | AdminWebModules webModules = new AdminWebModules (__instance);
|
---|
17 | AdminWebUsers webUsers = new AdminWebUsers (__instance);
|
---|
18 |
|
---|
19 | ___modules.Add (apiTokens.SectionTypeName, apiTokens);
|
---|
20 | ___modules.Add (webModules.SectionTypeName, webModules);
|
---|
21 | ___modules.Add (webUsers.SectionTypeName, webUsers);
|
---|
22 | }
|
---|
23 | }
|
---|
24 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.