- Timestamp:
- Aug 24, 2023, 12:48:17 PM (15 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TFP-WebServer/WebServer/src/Permissions/AdminWebModules.cs
r435 r474 41 41 42 42 public void AddModule (WebModule _module) { 43 lock ( this) {43 lock (Parent) { 44 44 allModulesList.Clear (); 45 45 … … 50 50 51 51 public bool RemoveModule (string _module) { 52 lock ( this) {52 lock (Parent) { 53 53 allModulesList.Clear (); 54 54 … … 63 63 64 64 public List<WebModule> GetModules () { 65 lock ( this) {65 lock (Parent) { 66 66 if (allModulesList.Count != 0) { 67 67 return allModulesList; … … 259 259 _module.IsDefault = true; 260 260 261 lock ( this) {261 lock (Parent) { 262 262 allModulesList.Clear (); 263 263 knownModules [_module.Name] = _module; … … 270 270 } 271 271 272 lock ( this) {272 lock (Parent) { 273 273 return knownModules.ContainsKey (_module); 274 274 } … … 276 276 277 277 public bool ModuleAllowedWithLevel (string _module, int _level) { 278 return GetModule (_module).LevelGlobal >= _level; 278 lock (Parent) { 279 return GetModule (_module).LevelGlobal >= _level; 280 } 279 281 } 280 282 281 283 public WebModule GetModule (string _module) { 282 if (modules.TryGetValue (_module, out WebModule result)) { 283 return result; 284 } 285 286 return knownModules.TryGetValue (_module, out result) ? result : defaultModulePermission; 284 lock (Parent) { 285 if (modules.TryGetValue (_module, out WebModule result)) { 286 return result; 287 } 288 289 return knownModules.TryGetValue (_module, out result) ? result : defaultModulePermission; 290 } 287 291 } 288 292
Note:
See TracChangeset
for help on using the changeset viewer.