This commit is contained in:
2021-06-10 20:18:39 +00:00
parent 430b6cd131
commit 41e246d84a

View File

@@ -119,8 +119,8 @@ namespace AyaNova.Api.Controllers
if (serverState.IsClosed)
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
//since this is for opening an entire object it's appropriate to check if they have read full role first
if (!Authorized.HasReadFullRole(HttpContext.Items, ayaType))
//since this is for opening an entire object it's appropriate to check if they have any role first
if (!Authorized.HasAnyRole(HttpContext.Items, ayaType))
return StatusCode(403, new ApiNotAuthorizedResponse());
if (!ModelState.IsValid)