Ignore:
Timestamp:
Jul 27, 2022, 7:17:17 PM (2 years ago)
Author:
alloc
Message:

A few bits of code cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • binary-improvements/MapRendering/Web/Handlers/PathHandler.cs

    r367 r372  
    1212                }
    1313
    14                 public string ModuleName {
    15                         get { return moduleName; }
    16                 }
     14                public string ModuleName => moduleName;
    1715
    1816                public abstract void HandleRequest (HttpListenerRequest _req, HttpListenerResponse _resp, WebConnection _user,
    1917                        int _permissionLevel);
    2018
    21                 public bool IsAuthorizedForHandler (WebConnection _user, int _permissionLevel) {
    22                         if (moduleName != null) {
    23                                 return WebPermissions.Instance.ModuleAllowedWithLevel (moduleName, _permissionLevel);
    24                         }
    25 
    26                         return true;
     19                public virtual bool IsAuthorizedForHandler (WebConnection _user, int _permissionLevel) {
     20                        return moduleName == null || WebPermissions.Instance.ModuleAllowedWithLevel (moduleName, _permissionLevel);
    2721                }
    2822
Note: See TracChangeset for help on using the changeset viewer.