Changeset 332 for binary-improvements/MapRendering/Web/WebConnection.cs
- Timestamp:
- Nov 16, 2018, 10:38:46 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/MapRendering/Web/WebConnection.cs
r326 r332 1 1 using System; 2 2 using System.Collections.Generic; 3 using System.Net; 3 4 using UnityEngine; 4 5 … … 10 11 private readonly string conDescription; 11 12 12 public WebConnection (string _sessionId, string_endpoint, ulong _steamId) {13 public WebConnection (string _sessionId, IPAddress _endpoint, ulong _steamId) { 13 14 SessionID = _sessionId; 14 15 Endpoint = _endpoint; … … 21 22 public string SessionID { get; private set; } 22 23 23 public stringEndpoint { get; private set; }24 public IPAddress Endpoint { get; private set; } 24 25 25 26 public ulong SteamID { get; private set; } … … 30 31 31 32 public static bool CanViewAllPlayers (int _permissionLevel) { 32 const int defaultPermissionLevel = 0; 33 34 bool val = _permissionLevel <= defaultPermissionLevel; 35 36 foreach (WebPermissions.WebModulePermission wap in WebPermissions.Instance.GetModules ()) { 37 if (wap.module.EqualsCaseInsensitive ("webapi.viewallplayers")) { 38 val = _permissionLevel <= wap.permissionLevel; 39 } 40 } 41 42 return val; 33 return WebPermissions.Instance.ModuleAllowedWithLevel ("webapi.viewallplayers", _permissionLevel); 43 34 } 44 35 45 36 public static bool CanViewAllClaims (int _permissionLevel) { 46 const int defaultPermissionLevel = 0; 47 48 bool val = _permissionLevel <= defaultPermissionLevel; 49 50 foreach (WebPermissions.WebModulePermission wap in WebPermissions.Instance.GetModules ()) { 51 if (wap.module.EqualsCaseInsensitive ("webapi.viewallclaims")) { 52 val = _permissionLevel <= wap.permissionLevel; 53 } 54 } 55 56 return val; 37 return WebPermissions.Instance.ModuleAllowedWithLevel ("webapi.viewallclaims", _permissionLevel); 57 38 } 58 39
Note:
See TracChangeset
for help on using the changeset viewer.