Changeset 326 for binary-improvements/MapRendering/Web/WebConnection.cs
- Timestamp:
- Sep 4, 2018, 2:33:52 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/MapRendering/Web/WebConnection.cs
r325 r326 6 6 public class WebConnection : ConsoleConnectionAbstract { 7 7 private readonly DateTime login; 8 private readonly List<string> outputLines = new List<string> ();8 // private readonly List<string> outputLines = new List<string> (); 9 9 private DateTime lastAction; 10 10 private readonly string conDescription; … … 30 30 31 31 public static bool CanViewAllPlayers (int _permissionLevel) { 32 bool val = false;32 const int defaultPermissionLevel = 0; 33 33 34 try { 35 const int defaultPermissionLevel = 0; 34 bool val = _permissionLevel <= defaultPermissionLevel; 36 35 37 val = _permissionLevel <= defaultPermissionLevel; 38 39 foreach (WebPermissions.WebModulePermission wap in WebPermissions.Instance.GetModules ()) { 40 if (wap.module.Trim ().ToLower () == "webapi.viewallplayers") { 41 val = _permissionLevel <= wap.permissionLevel; 42 } 36 foreach (WebPermissions.WebModulePermission wap in WebPermissions.Instance.GetModules ()) { 37 if (wap.module.EqualsCaseInsensitive ("webapi.viewallplayers")) { 38 val = _permissionLevel <= wap.permissionLevel; 43 39 } 44 } catch {45 40 } 46 41 … … 49 44 50 45 public static bool CanViewAllClaims (int _permissionLevel) { 51 bool val = false;46 const int defaultPermissionLevel = 0; 52 47 53 try { 54 const int defaultPermissionLevel = 0; 48 bool val = _permissionLevel <= defaultPermissionLevel; 55 49 56 val = _permissionLevel <= defaultPermissionLevel; 57 58 foreach (WebPermissions.WebModulePermission wap in WebPermissions.Instance.GetModules ()) { 59 if (wap.module.Trim ().ToLower () == "webapi.viewallclaims") { 60 val = _permissionLevel <= wap.permissionLevel; 61 } 50 foreach (WebPermissions.WebModulePermission wap in WebPermissions.Instance.GetModules ()) { 51 if (wap.module.EqualsCaseInsensitive ("webapi.viewallclaims")) { 52 val = _permissionLevel <= wap.permissionLevel; 62 53 } 63 } catch {64 54 } 65 55 … … 76 66 77 67 public override void SendLine (string _text) { 78 outputLines.Add (_text);68 // outputLines.Add (_text); 79 69 } 80 70 81 71 public override void SendLines (List<string> _output) { 82 outputLines.AddRange (_output);72 // outputLines.AddRange (_output); 83 73 } 84 74
Note:
See TracChangeset
for help on using the changeset viewer.