Ignore:
Timestamp:
May 17, 2023, 11:05:59 PM (18 months ago)
Author:
alloc
Message:

Added permission management APIs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • binary-improvements2/WebServer/src/UrlHandlers/AbsHandler.cs

    r426 r434  
    33namespace Webserver.UrlHandlers {
    44        public abstract class AbsHandler {
    5                 protected readonly string moduleName;
     5                public readonly string ModuleName;
    66                protected string urlBasePath;
    77                protected Web parent;
    88
    9                 public string ModuleName => moduleName;
    109                public string UrlBasePath => urlBasePath;
    1110
    1211                protected AbsHandler (string _moduleName, int _defaultPermissionLevel = 0) {
    13                         moduleName = _moduleName;
     12                        ModuleName = _moduleName;
    1413                        AdminWebModules.Instance.AddKnownModule (new AdminWebModules.WebModule(_moduleName, _defaultPermissionLevel, true));
    1514                }
     
    1817
    1918                public virtual bool IsAuthorizedForHandler (WebConnection _user, int _permissionLevel) {
    20                         return moduleName == null || AdminWebModules.Instance.ModuleAllowedWithLevel (moduleName, _permissionLevel);
     19                        return ModuleName == null || AdminWebModules.Instance.ModuleAllowedWithLevel (ModuleName, _permissionLevel);
    2120                }
    2221
Note: See TracChangeset for help on using the changeset viewer.