Changeset 427 for binary-improvements2/WebServer
- Timestamp:
- Apr 25, 2023, 7:41:10 PM (19 months ago)
- Location:
- binary-improvements2/WebServer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements2/WebServer/ModInfo.xml
r426 r427 5 5 <Description value="Integrated Webserver for the Web Dashboard and server APIs" /> 6 6 <Author value="The Fun Pimps LLC" /> 7 <Version value="21.0.27 0.0" />7 <Version value="21.0.271.0" /> 8 8 <Website value="" /> 9 9 </xml> -
binary-improvements2/WebServer/src/Permissions/AdminWebModules.cs
r426 r427 82 82 83 83 public struct WebModule { 84 private const string methodLevelInheritKeyword = "inherit"; 85 84 86 public string Name; 85 87 public int LevelGlobal; … … 134 136 permissionElement.AddXmlElement ("method") 135 137 .SetAttrib ("name", method.ToStringCached ()) 136 .SetAttrib ("permission_level", level .ToString ());138 .SetAttrib ("permission_level", level == MethodLevelInheritGlobal ? methodLevelInheritKeyword : level.ToString ()); 137 139 } 138 140 } … … 193 195 } 194 196 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)) { 196 201 Log.Warning ( 197 202 $"[Web] [Perms] Ignoring module child element, invalid (non-numeric) value for 'permission_level' attribute: {childElem.OuterXml}");
Note:
See TracChangeset
for help on using the changeset viewer.