Cleanup and better comments to clarify licensing code

This commit is contained in:
2022-10-25 20:30:57 +00:00
parent bb6c15286b
commit 102c145386
4 changed files with 31 additions and 53 deletions

View File

@@ -45,6 +45,12 @@ namespace AyaNova.Api.ControllerHelpers
//Lock down the server for license related issue
//Only SuperUser account (id=1) can login or do anything, treats as if server was set to closed even if they change it to open
//only way to reset it is to fetch a valid license
// This is set to locked in TWO ways:
// 1) By CoreJobSweeper *if* the user count is mismatched to the license likely due to Users messing directly with the DB
//trying to circumvent licensing
// 2) By License::InitializeAsync upon finding user count mismatch or expired license key
// and initializeasync is called on boot up or when a new key is downloaded and installed only
//
var msg = $"{reason}\r\nLogin as SuperUser to start evaluation / install license";
SetState(ServerState.OpsOnly, msg);
@@ -185,7 +191,7 @@ namespace AyaNova.Api.ControllerHelpers
{
get
{
return _currentState != ServerState.Closed && _currentState != ServerState.OpsOnly && !SYSTEM_LOCK ;
return _currentState != ServerState.Closed && _currentState != ServerState.OpsOnly && !SYSTEM_LOCK;
}
}