This commit is contained in:
@@ -71,7 +71,7 @@ namespace AyaNova.Api.Controllers
|
||||
return StatusCode(503, new ApiErrorResponse(ApiErrorCode.API_CLOSED, null, serverState.Reason));
|
||||
}
|
||||
|
||||
if (!Authorized.IsAuthorizedToCreate(HttpContext.Items, AyaType.AyaNova7Import))
|
||||
if (!Authorized.HasCreateRole(HttpContext.Items, AyaType.AyaNova7Import))
|
||||
{
|
||||
return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||
}
|
||||
@@ -164,7 +164,7 @@ namespace AyaNova.Api.Controllers
|
||||
}
|
||||
|
||||
|
||||
if (!Authorized.IsAuthorizedToDelete(HttpContext.Items, AyaType.AyaNova7Import))
|
||||
if (!Authorized.HasDeleteRole(HttpContext.Items, AyaType.AyaNova7Import))
|
||||
{
|
||||
return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||
}
|
||||
@@ -192,7 +192,7 @@ namespace AyaNova.Api.Controllers
|
||||
return StatusCode(503, new ApiErrorResponse(ApiErrorCode.API_CLOSED, null, serverState.Reason));
|
||||
}
|
||||
|
||||
if (!Authorized.IsAuthorizedToReadFullRecord(HttpContext.Items, AyaType.AyaNova7Import))
|
||||
if (!Authorized.HasReadFullRole(HttpContext.Items, AyaType.AyaNova7Import))
|
||||
{
|
||||
return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||
}
|
||||
@@ -245,7 +245,7 @@ namespace AyaNova.Api.Controllers
|
||||
// #endif
|
||||
|
||||
//Create, in that they are creating new data in AyaNova
|
||||
if (!Authorized.IsAuthorizedToCreate(HttpContext.Items, AyaType.AyaNova7Import))
|
||||
if (!Authorized.HasCreateRole(HttpContext.Items, AyaType.AyaNova7Import))
|
||||
{
|
||||
return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user