mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2024-11-24 00:53:39 +01:00
vncserver: extract EnsureAtLeastOneKasmUserExists()
This commit is contained in:
parent
65f957695e
commit
2b4f01f5ae
@ -42,10 +42,8 @@ $pidFile = "$vncUserDir/$host:$displayNumber.pid";
|
||||
$kasmAuthEnabled = 1;
|
||||
&DisableVncAuth();
|
||||
|
||||
@kasmPasswdUsers = &LoadKasmPasswdUsers();
|
||||
if ($kasmAuthEnabled && !&AtLeastOneUserConfigured()) {
|
||||
&GuideUserToSetupKasmPasswdUser();
|
||||
@kasmPasswdUsers = &LoadKasmPasswdUsers();
|
||||
if ($kasmAuthEnabled) {
|
||||
&EnsureAtLeastOneKasmUserExists();
|
||||
}
|
||||
|
||||
&SetupXauthorityFile();
|
||||
@ -1048,3 +1046,11 @@ sub PrepareDefaultsForPassingToXvnc {
|
||||
&SetReasonabeDefaults();
|
||||
&LoadSystemThenUserThenMandatoryConfigs();
|
||||
}
|
||||
|
||||
sub EnsureAtLeastOneKasmUserExists {
|
||||
@kasmPasswdUsers = &LoadKasmPasswdUsers();
|
||||
if (!&AtLeastOneUserConfigured()) {
|
||||
&GuideUserToSetupKasmPasswdUser();
|
||||
@kasmPasswdUsers = &LoadKasmPasswdUsers();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user