Fix issue where setup system could re-enable itself
The current initial setup system would re-enable if setup.lock was removed even if an account was in the database. This is because when we switched to "owner" being the primary target of the setup system, we failed to anticipate that an account with superadmin would never exist in the database in an ideal condition.
This commit is contained in:
parent
0826a37fe8
commit
ffdcd34c91
1 changed files with 2 additions and 2 deletions
|
|
@ -861,8 +861,8 @@ namespace TShockAPI
|
|||
Config.ServerPassword = _cliPassword;
|
||||
}
|
||||
|
||||
// Disable the auth system if "setup.lock" is present or a superadmin exists
|
||||
if (File.Exists(Path.Combine(SavePath, "setup.lock")) || UserAccounts.GetUserAccounts().Exists(u => u.Group == new SuperAdminGroup().Name))
|
||||
// Disable the auth system if "setup.lock" is present or a user account already exists
|
||||
if (File.Exists(Path.Combine(SavePath, "setup.lock")) || (UserAccounts.GetUserAccounts().Count() > 0))
|
||||
{
|
||||
SetupToken = 0;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue