Changeset 404 for binary-improvements2/WebServer/src/WebConnection.cs
- Timestamp:
- Feb 16, 2023, 3:50:53 PM (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements2/WebServer/src/WebConnection.cs
r402 r404 3 3 using System.Net; 4 4 using UnityEngine; 5 using Webserver.Permissions; 5 6 6 7 namespace Webserver { … … 15 16 public IPAddress Endpoint { get; } 16 17 18 public string Username { get; } 17 19 public PlatformUserIdentifierAbs UserId { get; } 20 public PlatformUserIdentifierAbs CrossplatformUserId { get; } 18 21 19 22 public TimeSpan Age => DateTime.Now - lastAction; 20 23 21 public WebConnection (string _sessionId, IPAddress _endpoint, PlatformUserIdentifierAbs _userId) {24 public WebConnection (string _sessionId, IPAddress _endpoint, string _username, PlatformUserIdentifierAbs _userId, PlatformUserIdentifierAbs _crossUserId = null) { 22 25 SessionID = _sessionId; 23 26 Endpoint = _endpoint; 27 Username = _username; 24 28 UserId = _userId; 29 CrossplatformUserId = _crossUserId; 25 30 login = DateTime.Now; 26 31 lastAction = login; … … 29 34 30 35 public static bool CanViewAllPlayers (int _permissionLevel) { 31 return WebPermissions.Instance.ModuleAllowedWithLevel ("webapi.viewallplayers", _permissionLevel);36 return AdminWebModules.Instance.ModuleAllowedWithLevel ("webapi.viewallplayers", _permissionLevel); 32 37 } 33 38 34 39 public static bool CanViewAllClaims (int _permissionLevel) { 35 return WebPermissions.Instance.ModuleAllowedWithLevel ("webapi.viewallclaims", _permissionLevel);40 return AdminWebModules.Instance.ModuleAllowedWithLevel ("webapi.viewallclaims", _permissionLevel); 36 41 } 37 42
Note:
See TracChangeset
for help on using the changeset viewer.