Cleanup and better comments to clarify licensing code
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user