Changeset 251 for binary-improvements/MapRendering/Web/WebConnection.cs
- Timestamp:
- Oct 28, 2015, 7:51:20 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/MapRendering/Web/WebConnection.cs
r250 r251 1 1 using System; 2 2 using System.Collections.Generic; 3 3 using AllocsFixes.NetConnections.Servers.Web; 4 4 using UnityEngine; 5 5 … … 29 29 get { return DateTime.Now - lastAction; } 30 30 } 31 32 public bool CanViewAllPlayers (int _permissionLevel) { 33 bool val = false; 34 35 try { 36 const int defaultPermissionLevel = 0; 37 38 val = _permissionLevel <= defaultPermissionLevel; 39 40 foreach (WebPermissions.WebModulePermission wap in WebPermissions.Instance.GetModules ()) 41 if (wap.module.Trim ().ToLower () == "webapi.viewallplayers") 42 val = _permissionLevel <= wap.permissionLevel; 43 } 44 catch { } 45 46 return val; 47 } 48 49 public bool CanViewAllClaims (int _permissionLevel) { 50 bool val = false; 51 52 try { 53 const int defaultPermissionLevel = 0; 54 55 val = _permissionLevel <= defaultPermissionLevel; 56 57 foreach (WebPermissions.WebModulePermission wap in WebPermissions.Instance.GetModules ()) 58 if (wap.module.Trim ().ToLower () == "webapi.viewallclaims") 59 val = _permissionLevel <= wap.permissionLevel; 60 } 61 catch { } 62 63 return val; 64 } 31 65 32 66 public WebConnection (string _sessionId, string _endpoint, ulong _steamId) {
Note:
See TracChangeset
for help on using the changeset viewer.