Changeset 399 for binary-improvements2/WebServer/src/WebPermissions.cs
- Timestamp:
- Aug 14, 2022, 8:13:05 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements2/WebServer/src/WebPermissions.cs
r395 r399 184 184 185 185 private void OnFileChanged (object _source, FileSystemEventArgs _e) { 186 Log.Out (" Reloading " + SettingsFileName);186 Log.Out ("[Web] [Perms] Reloading " + SettingsFileName); 187 187 Load (); 188 188 } … … 193 193 194 194 if (!File.Exists (SettingsFullPath)) { 195 Log.Out ($" Permissions file '{SettingsFileName}' not found, creating.");195 Log.Out ($"[Web] [Perms] Permissions file '{SettingsFileName}' not found, creating."); 196 196 Save (); 197 197 return; 198 198 } 199 199 200 Log.Out ($" Loading permissions file at '{SettingsFullPath}'");200 Log.Out ($"[Web] [Perms] Loading permissions file at '{SettingsFullPath}'"); 201 201 202 202 XmlDocument xmlDoc = new XmlDocument (); … … 205 205 xmlDoc.Load (SettingsFullPath); 206 206 } catch (XmlException e) { 207 Log.Error (" Failed loading permissions file: " + e.Message);207 Log.Error ("[Web] [Perms] Failed loading permissions file: " + e.Message); 208 208 return; 209 209 } … … 212 212 213 213 if (adminToolsNode == null) { 214 Log.Error (" Failed loading permissions file: No DocumentElement found");214 Log.Error ("[Web] [Perms] Failed loading permissions file: No DocumentElement found"); 215 215 return; 216 216 } … … 227 227 } 228 228 229 Log.Out (" Loading permissions file done.");229 Log.Out ("[Web] [Perms] Loading permissions file done."); 230 230 } 231 231 … … 237 237 238 238 if (subChild.NodeType != XmlNodeType.Element) { 239 Log.Warning ($" Unexpected XML node found in 'admintokens' section: {subChild.OuterXml}");239 Log.Warning ($"[Web] [Perms] Unexpected XML node found in 'admintokens' section: {subChild.OuterXml}"); 240 240 continue; 241 241 } … … 244 244 245 245 if (!lineItem.HasAttribute ("name")) { 246 Log.Warning ($" Ignoring admintoken-entry because of missing 'name' attribute: {subChild.OuterXml}");246 Log.Warning ($"[Web] [Perms] Ignoring admintoken-entry because of missing 'name' attribute: {subChild.OuterXml}"); 247 247 continue; 248 248 } 249 249 250 250 if (!lineItem.HasAttribute ("token")) { 251 Log.Warning ($" Ignoring admintoken-entry because of missing 'token' attribute: {subChild.OuterXml}");251 Log.Warning ($"[Web] [Perms] Ignoring admintoken-entry because of missing 'token' attribute: {subChild.OuterXml}"); 252 252 continue; 253 253 } 254 254 255 255 if (!lineItem.HasAttribute ("permission_level")) { 256 Log.Warning ($" Ignoring admintoken-entry because of missing 'permission_level' attribute: {subChild.OuterXml}");256 Log.Warning ($"[Web] [Perms] Ignoring admintoken-entry because of missing 'permission_level' attribute: {subChild.OuterXml}"); 257 257 continue; 258 258 } … … 262 262 if (!int.TryParse (lineItem.GetAttribute ("permission_level"), out int permissionLevel)) { 263 263 Log.Warning ( 264 $" Ignoring admintoken-entry because of invalid (non-numeric) value for 'permission_level' attribute: {subChild.OuterXml}");264 $"[Web] [Perms] Ignoring admintoken-entry because of invalid (non-numeric) value for 'permission_level' attribute: {subChild.OuterXml}"); 265 265 continue; 266 266 } … … 277 277 278 278 if (subChild.NodeType != XmlNodeType.Element) { 279 Log.Warning ($" Unexpected XML node found in 'permissions' section: {subChild.OuterXml}");279 Log.Warning ($"[Web] [Perms] Unexpected XML node found in 'permissions' section: {subChild.OuterXml}"); 280 280 continue; 281 281 } … … 284 284 285 285 if (!lineItem.HasAttribute ("module")) { 286 Log.Warning ($" Ignoring permission-entry because of missing 'module' attribute: {subChild.OuterXml}");286 Log.Warning ($"[Web] [Perms] Ignoring permission-entry because of missing 'module' attribute: {subChild.OuterXml}"); 287 287 continue; 288 288 } 289 289 290 290 if (!lineItem.HasAttribute ("permission_level")) { 291 Log.Warning ($" Ignoring permission-entry because of missing 'permission_level' attribute: {subChild.OuterXml}");291 Log.Warning ($"[Web] [Perms] Ignoring permission-entry because of missing 'permission_level' attribute: {subChild.OuterXml}"); 292 292 continue; 293 293 } … … 295 295 if (!int.TryParse (lineItem.GetAttribute ("permission_level"), out int permissionLevel)) { 296 296 Log.Warning ( 297 $" Ignoring permission-entry because of invalid (non-numeric) value for 'permission_level' attribute: {subChild.OuterXml}");297 $"[Web] [Perms] Ignoring permission-entry because of invalid (non-numeric) value for 'permission_level' attribute: {subChild.OuterXml}"); 298 298 continue; 299 299 }
Note:
See TracChangeset
for help on using the changeset viewer.