This commit is contained in:
@@ -119,8 +119,8 @@ namespace AyaNova.Api.Controllers
|
|||||||
if (serverState.IsClosed)
|
if (serverState.IsClosed)
|
||||||
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
|
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
|
//since this is for opening an entire object it's appropriate to check if they have any role first
|
||||||
if (!Authorized.HasReadFullRole(HttpContext.Items, ayaType))
|
if (!Authorized.HasAnyRole(HttpContext.Items, ayaType))
|
||||||
return StatusCode(403, new ApiNotAuthorizedResponse());
|
return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||||
|
|
||||||
if (!ModelState.IsValid)
|
if (!ModelState.IsValid)
|
||||||
|
|||||||
Reference in New Issue
Block a user