Changeset 427 for binary-improvements2/WebServer/src/Permissions
- Timestamp:
- Apr 25, 2023, 7:41:10 PM (20 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.