This commit is contained in:
2020-07-24 22:24:33 +00:00
parent 9a35aa682c
commit 095732da1b
2 changed files with 2 additions and 2 deletions

View File

@@ -122,7 +122,7 @@ namespace AyaNova.Api.Controllers
return StatusCode(401, new ApiErrorResponse(ApiErrorCode.AUTHENTICATION_FAILED)); return StatusCode(401, new ApiErrorResponse(ApiErrorCode.AUTHENTICATION_FAILED));
} }
if (!Authorized.HasModifyRole(HttpContext.Items, AyaType.Backup))//not technically modify but treating as such as a backup is very sensitive data if (!Authorized.HasModifyRole(DownloadUser.Roles, AyaType.Backup))//not technically modify but treating as such as a backup is very sensitive data
{ {
await Task.Delay(nFailedAuthDelay);//DOS protection await Task.Delay(nFailedAuthDelay);//DOS protection
return StatusCode(403, new ApiNotAuthorizedResponse()); return StatusCode(403, new ApiNotAuthorizedResponse());

View File

@@ -337,7 +337,7 @@ namespace AyaNova.Biz
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
//GLOBAL OPS SETTINGS //GLOBAL OPS SETTINGS
// (control the backup) //
roles.Add(AyaType.GlobalOps, new BizRoleSet() roles.Add(AyaType.GlobalOps, new BizRoleSet()
{ {
Change = AuthorizationRoles.OpsAdminFull, Change = AuthorizationRoles.OpsAdminFull,