This commit is contained in:
2021-03-02 23:03:11 +00:00
parent ddf0017e93
commit 1b07953f59
8 changed files with 41 additions and 32 deletions

View File

@@ -19,10 +19,12 @@ namespace AyaNova.Api.ControllerHelpers
UNKNOWN = 0,
///<summary>No access for anyone API completely locked down. Not set by user but rather by internal server operations like importing or backup.</summary>
Closed = 1,
///<summary>Access only to SuperUser account for migration from AyaNova 7</summary>
MigrateMode = 2,
///<summary>Access only to API Operations routes. Can be set by Ops user</summary>
OpsOnly = 2,
OpsOnly = 3,
///<summary>Open for all users (default). Can be set by Ops user</summary>
Open = 3
Open = 4
}
private ServerState _currentState = ServerState.Closed;
@@ -121,6 +123,8 @@ namespace AyaNova.Api.ControllerHelpers
throw new System.NotSupportedException("ApiServerState:ApiErrorCode - No error code is associated with server state OPEN");
case ServerState.OpsOnly:
return ApiErrorCode.API_OPS_ONLY;
case ServerState.MigrateMode:
return ApiErrorCode.API_MIGRATE_MODE;
case ServerState.Closed:
return ApiErrorCode.API_CLOSED;