Changeset 440
- Timestamp:
- May 24, 2023, 4:53:49 PM (19 months ago)
- Location:
- TFP-WebServer
- Files:
-
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
TFP-WebServer/CommandExtensions/ModInfo.xml
r435 r440 5 5 <Description value="Additional commands for server operation" /> 6 6 <Author value="The Fun Pimps LLC" /> 7 <Version value="21.0.2 89.0" />7 <Version value="21.0.293.0" /> 8 8 <Website value="" /> 9 9 </xml> -
TFP-WebServer/MapRendering/ModInfo.xml
r435 r440 5 5 <Description value="Render the game map to image map tiles as it is uncovered" /> 6 6 <Author value="The Fun Pimps LLC" /> 7 <Version value="21.0.2 89.0" />7 <Version value="21.0.293.0" /> 8 8 <Website value="" /> 9 9 </xml> -
TFP-WebServer/MarkersMod/ModInfo.xml
r435 r440 5 5 <Description value="Allows placing custom markers on the web map" /> 6 6 <Author value="Catalysm and Alloc" /> 7 <Version value="21.0.2 89.0" />7 <Version value="21.0.293.0" /> 8 8 <Website value="" /> 9 9 </xml> -
TFP-WebServer/WebServer/ModInfo.xml
r438 r440 5 5 <Description value="Integrated Webserver for the Web Dashboard and server APIs" /> 6 6 <Author value="The Fun Pimps LLC" /> 7 <Version value="21.0.2 89.3" />7 <Version value="21.0.293.0" /> 8 8 <Website value="" /> 9 9 </xml> -
TFP-WebServer/WebServer/src/Permissions/AdminApiTokens.cs
r404 r440 117 117 } 118 118 119 if (IsCommandlineToken (_name, _secret)) { 120 return 0; 121 } 122 119 123 return int.MaxValue; 124 } 125 126 private bool commandlineChecked; 127 private string commandlineTokenName; 128 private string commandlineTokenSecret; 129 130 private bool IsCommandlineToken (string _name, string _secret) { 131 if (!commandlineChecked) { 132 commandlineTokenName = GameUtils.GetLaunchArgument ("webapitokenname"); 133 commandlineTokenSecret = GameUtils.GetLaunchArgument ("webapitokensecret"); 134 135 commandlineChecked = true; 136 } 137 138 if (string.IsNullOrEmpty (commandlineTokenName) || string.IsNullOrEmpty (commandlineTokenSecret)) { 139 return false; 140 } 141 142 return _name == commandlineTokenName && _secret == commandlineTokenSecret; 120 143 } 121 144 -
TFP-WebServer/WebServer/src/UrlHandlers/AbsHandler.cs
r434 r440 16 16 public abstract void HandleRequest (RequestContext _context); 17 17 18 public virtual bool IsAuthorizedForHandler ( WebConnection _user, int _permissionLevel) {19 return ModuleName == null || AdminWebModules.Instance.ModuleAllowedWithLevel (ModuleName, _ permissionLevel);18 public virtual bool IsAuthorizedForHandler (RequestContext _context) { 19 return ModuleName == null || AdminWebModules.Instance.ModuleAllowedWithLevel (ModuleName, _context.PermissionLevel); 20 20 } 21 21 -
TFP-WebServer/WebServer/src/Web.cs
r434 r440 271 271 } 272 272 273 if (!handler.IsAuthorizedForHandler (_context .Connection, _context.PermissionLevel)) {273 if (!handler.IsAuthorizedForHandler (_context)) { 274 274 _context.Response.StatusCode = (int)HttpStatusCode.Forbidden; 275 275 if (_context.Connection != null) { -
TFP-WebServer/bin/Mods/TFP_CommandExtensions/ModInfo.xml
r435 r440 5 5 <Description value="Additional commands for server operation" /> 6 6 <Author value="The Fun Pimps LLC" /> 7 <Version value="21.0.2 89.0" />7 <Version value="21.0.293.0" /> 8 8 <Website value="" /> 9 9 </xml> -
TFP-WebServer/bin/Mods/TFP_MapRendering/ModInfo.xml
r435 r440 5 5 <Description value="Render the game map to image map tiles as it is uncovered" /> 6 6 <Author value="The Fun Pimps LLC" /> 7 <Version value="21.0.2 89.0" />7 <Version value="21.0.293.0" /> 8 8 <Website value="" /> 9 9 </xml> -
TFP-WebServer/bin/Mods/TFP_WebServer/ModInfo.xml
r438 r440 5 5 <Description value="Integrated Webserver for the Web Dashboard and server APIs" /> 6 6 <Author value="The Fun Pimps LLC" /> 7 <Version value="21.0.2 89.3" />7 <Version value="21.0.293.0" /> 8 8 <Website value="" /> 9 9 </xml> -
TFP-WebServer/bin/Mods/Xample_MarkersMod/ModInfo.xml
r435 r440 5 5 <Description value="Allows placing custom markers on the web map" /> 6 6 <Author value="Catalysm and Alloc" /> 7 <Version value="21.0.2 89.0" />7 <Version value="21.0.293.0" /> 8 8 <Website value="" /> 9 9 </xml>
Note:
See TracChangeset
for help on using the changeset viewer.