This commit is contained in:
@@ -1,3 +1,11 @@
|
|||||||
# OP-BACKUP Placeholder
|
# OPS-BACKUP Placeholder
|
||||||
|
|
||||||
This is a placeholder page for sections that are not written yet
|
ROLES AND RIGHTS:
|
||||||
|
Modify automated backup settings
|
||||||
|
Trigger backup
|
||||||
|
DownloadBackup file
|
||||||
|
OpsFull
|
||||||
|
View Backup settings
|
||||||
|
OpsFull, opslimited
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ 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));
|
||||||
if (!Authorized.HasAnyRole(HttpContext.Items, AuthorizationRoles.OpsAdminFull | AuthorizationRoles.OpsAdminLimited))
|
if (!Authorized.HasAnyRole(HttpContext.Items, AuthorizationRoles.OpsAdminFull))
|
||||||
return StatusCode(403, new ApiNotAuthorizedResponse());
|
return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||||
var JobName = $"Backup (on demand)";
|
var JobName = $"Backup (on demand)";
|
||||||
OpsJob j = new OpsJob();
|
OpsJob j = new OpsJob();
|
||||||
@@ -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.HasAnyRole(DownloadUser.Roles, AuthorizationRoles.OpsAdminFull | AuthorizationRoles.OpsAdminLimited))
|
if (!Authorized.HasAnyRole(DownloadUser.Roles, AuthorizationRoles.OpsAdminFull))
|
||||||
{
|
{
|
||||||
await Task.Delay(nFailedAuthDelay);//DOS protection
|
await Task.Delay(nFailedAuthDelay);//DOS protection
|
||||||
return StatusCode(403, new ApiNotAuthorizedResponse());
|
return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||||
|
|||||||
@@ -341,7 +341,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,
|
||||||
|
|||||||
Reference in New Issue
Block a user