Changeset 427


Ignore:
Timestamp:
Apr 25, 2023, 7:41:10 PM (19 months ago)
Author:
alloc
Message:

*Save inherited per-method permission as "inherit" instead of the actual int.minValue string

Location:
binary-improvements2
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • binary-improvements2/CommandExtensions/ModInfo.xml

    r426 r427  
    55        <Description value="Additional commands for server operation" />
    66        <Author value="The Fun Pimps LLC" />
    7         <Version value="21.0.270.0" />
     7        <Version value="21.0.271.0" />
    88        <Website value="" />
    99</xml>
  • binary-improvements2/MapRendering/ModInfo.xml

    r426 r427  
    55        <Description value="Render the game map to image map tiles as it is uncovered" />
    66        <Author value="The Fun Pimps LLC" />
    7         <Version value="21.0.270.0" />
     7        <Version value="21.0.271.0" />
    88        <Website value="" />
    99</xml>
  • binary-improvements2/MarkersMod/ModInfo.xml

    r426 r427  
    55        <Description value="Allows placing custom markers on the web map" />
    66        <Author value="Catalysm and Alloc" />
    7         <Version value="21.0.270.0" />
     7        <Version value="21.0.271.0" />
    88        <Website value="" />
    99</xml>
  • binary-improvements2/WebServer/ModInfo.xml

    r426 r427  
    55        <Description value="Integrated Webserver for the Web Dashboard and server APIs" />
    66        <Author value="The Fun Pimps LLC" />
    7         <Version value="21.0.270.0" />
     7        <Version value="21.0.271.0" />
    88        <Website value="" />
    99</xml>
  • binary-improvements2/WebServer/src/Permissions/AdminWebModules.cs

    r426 r427  
    8282               
    8383                public struct WebModule {
     84                        private const string methodLevelInheritKeyword = "inherit";
     85
    8486                        public string Name;
    8587                        public int LevelGlobal;
     
    134136                                        permissionElement.AddXmlElement ("method")
    135137                                                .SetAttrib ("name", method.ToStringCached ())
    136                                                 .SetAttrib ("permission_level", level.ToString ());
     138                                                .SetAttrib ("permission_level", level == MethodLevelInheritGlobal ? methodLevelInheritKeyword : level.ToString ());
    137139                                }
    138140                        }
     
    193195                                        }
    194196
    195                                         if (!int.TryParse (permissionLevelString, out int methodPermissionLevel)) {
     197                                        int methodPermissionLevel;
     198                                        if (permissionLevelString.EqualsCaseInsensitive (methodLevelInheritKeyword)) {
     199                                                methodPermissionLevel = MethodLevelInheritGlobal;
     200                                        } else if (!int.TryParse (permissionLevelString, out methodPermissionLevel)) {
    196201                                                Log.Warning (
    197202                                                        $"[Web] [Perms] Ignoring module child element, invalid (non-numeric) value for 'permission_level' attribute: {childElem.OuterXml}");
  • binary-improvements2/bin/Mods/TFP_CommandExtensions/ModInfo.xml

    r426 r427  
    55        <Description value="Additional commands for server operation" />
    66        <Author value="The Fun Pimps LLC" />
    7         <Version value="21.0.270.0" />
     7        <Version value="21.0.271.0" />
    88        <Website value="" />
    99</xml>
  • binary-improvements2/bin/Mods/TFP_MapRendering/ModInfo.xml

    r426 r427  
    55        <Description value="Render the game map to image map tiles as it is uncovered" />
    66        <Author value="The Fun Pimps LLC" />
    7         <Version value="21.0.270.0" />
     7        <Version value="21.0.271.0" />
    88        <Website value="" />
    99</xml>
  • binary-improvements2/bin/Mods/TFP_WebServer/ModInfo.xml

    r426 r427  
    55        <Description value="Integrated Webserver for the Web Dashboard and server APIs" />
    66        <Author value="The Fun Pimps LLC" />
    7         <Version value="21.0.270.0" />
     7        <Version value="21.0.271.0" />
    88        <Website value="" />
    99</xml>
  • binary-improvements2/bin/Mods/Xample_MarkersMod/ModInfo.xml

    r426 r427  
    55        <Description value="Allows placing custom markers on the web map" />
    66        <Author value="Catalysm and Alloc" />
    7         <Version value="21.0.270.0" />
     7        <Version value="21.0.271.0" />
    88        <Website value="" />
    99</xml>
Note: See TracChangeset for help on using the changeset viewer.