This commit is contained in:
2021-10-18 19:46:09 +00:00
parent cb33d70107
commit 5fdd5c73ba
3 changed files with 20 additions and 8 deletions

View File

@@ -53,7 +53,7 @@ namespace AyaNova.Api.Controllers
[HttpGet("{id}")]
public async Task<IActionResult> GetUserOptions([FromRoute] long id)
{
if (!serverState.IsOpen)
if (!serverState.IsOpen && UserIdFromContext.Id(HttpContext.Items) != 1)//bypass for superuser to fix fundamental problems
{
//Exception for SuperUser account to handle licensing issues
if (UserIdFromContext.Id(HttpContext.Items) != 1)
@@ -137,7 +137,7 @@ namespace AyaNova.Api.Controllers
[HttpPut("{id}")]
public async Task<IActionResult> PutUserOptions([FromRoute] long id, [FromBody] UserOptions inObj)
{
if (serverState.IsClosed)
if (serverState.IsClosed && UserIdFromContext.Id(HttpContext.Items) != 1)//bypass for superuser to fix fundamental problems
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
if (!ModelState.IsValid)