Changeset 485 for TFP-WebServer/WebServer/src
- Timestamp:
- Feb 26, 2024, 5:58:03 PM (9 months ago)
- Location:
- TFP-WebServer/WebServer/src
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
TFP-WebServer/WebServer/src/Permissions/AdminWebUsers.cs
r474 r485 155 155 156 156 foreach ((string _, WebUser webUser) in users) { 157 if (! PlatformUserIdentifierAbs.Equals (webUser.PlatformUser, _platformUser) ||158 ! PlatformUserIdentifierAbs.Equals (webUser.CrossPlatformUser, _crossPlatformUser)) {157 if (!Equals (webUser.PlatformUser, _platformUser) || 158 !Equals (webUser.CrossPlatformUser, _crossPlatformUser)) { 159 159 continue; 160 160 } -
TFP-WebServer/WebServer/src/WebAPI/APIs/Command.cs
r468 r485 132 132 133 133 public override int DefaultPermissionLevel () => Constants.cDefaultUserPermissionLevel; 134 135 public override int[] DefaultMethodPermissionLevels() => new[] { 136 AdminWebModules.MethodLevelNotSupported, 137 AdminWebModules.PermissionLevelGuest, 138 AdminWebModules.MethodLevelInheritGlobal, 139 AdminWebModules.MethodLevelNotSupported, 140 AdminWebModules.MethodLevelNotSupported 141 }; 134 142 } 135 143 } -
TFP-WebServer/WebServer/src/WebAPI/APIs/Permissions/Blacklist.cs
r460 r485 100 100 } 101 101 102 if ( PlatformUserIdentifierAbs.TryFromCombinedString (id, out _userId)) {102 if (!PlatformUserIdentifierAbs.TryFromCombinedString (id, out _userId)) { 103 103 SendEmptyResponse (_context, HttpStatusCode.BadRequest, _jsonInputData, "INVALID_USER"); 104 104 return false; -
TFP-WebServer/WebServer/src/WebAPI/APIs/Permissions/CommandPermissions.openapi.yaml
r462 r485 55 55 56 56 paths: 57 /api/commandpermission :57 /api/commandpermissions: 58 58 get: 59 59 tags: … … 85 85 86 86 87 /api/commandpermission /{command}:87 /api/commandpermissions/{command}: 88 88 # get: 89 89 # tags: -
TFP-WebServer/WebServer/src/WebAPI/APIs/Permissions/RegisterUser.cs
r459 r485 83 83 // Username already exists 84 84 85 if (! PlatformUserIdentifierAbs.Equals (existingMapping.PlatformUser, regData.PlatformUserId) ||86 ! PlatformUserIdentifierAbs.Equals (existingMapping.CrossPlatformUser, regData.CrossPlatformUserId)) {85 if (!Equals (existingMapping.PlatformUser, regData.PlatformUserId) || 86 !Equals (existingMapping.CrossPlatformUser, regData.CrossPlatformUserId)) { 87 87 // Username already in use by another player 88 88 SendEmptyResponse (_context, HttpStatusCode.Unauthorized, _jsonInputData, "DUPLICATE_USERNAME"); -
TFP-WebServer/WebServer/src/WebAPI/APIs/Permissions/WebModules.openapi.yaml
r462 r485 59 59 type: object 60 60 properties: 61 secret: 62 string 63 permissionLevel: 61 permissionLevelGlobal: 64 62 type: integer 63 description: Permission level for the overall module 64 permissionLevelPerMethod: 65 type: object 66 properties: 67 GET: 68 $ref: '#/components/schemas/TypeWebMethodPermissionEntry' 69 POST: 70 $ref: '#/components/schemas/TypeWebMethodPermissionEntry' 71 PUT: 72 $ref: '#/components/schemas/TypeWebMethodPermissionEntry' 73 DELETE: 74 $ref: '#/components/schemas/TypeWebMethodPermissionEntry' 75 description: Permission levels per HTTP method 65 76 required: 66 - secret67 - permissionLevel 77 - permissionLevelGlobal 78 - permissionLevelPerMethod 68 79 required: true 69 80
Note:
See TracChangeset
for help on using the changeset viewer.