mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2025-03-11 05:28:11 +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;
|
$kasmAuthEnabled = 1;
|
||||||
&DisableVncAuth();
|
&DisableVncAuth();
|
||||||
|
|
||||||
@kasmPasswdUsers = &LoadKasmPasswdUsers();
|
if ($kasmAuthEnabled) {
|
||||||
if ($kasmAuthEnabled && !&AtLeastOneUserConfigured()) {
|
&EnsureAtLeastOneKasmUserExists();
|
||||||
&GuideUserToSetupKasmPasswdUser();
|
|
||||||
@kasmPasswdUsers = &LoadKasmPasswdUsers();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&SetupXauthorityFile();
|
&SetupXauthorityFile();
|
||||||
@ -1048,3 +1046,11 @@ sub PrepareDefaultsForPassingToXvnc {
|
|||||||
&SetReasonabeDefaults();
|
&SetReasonabeDefaults();
|
||||||
&LoadSystemThenUserThenMandatoryConfigs();
|
&LoadSystemThenUserThenMandatoryConfigs();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub EnsureAtLeastOneKasmUserExists {
|
||||||
|
@kasmPasswdUsers = &LoadKasmPasswdUsers();
|
||||||
|
if (!&AtLeastOneUserConfigured()) {
|
||||||
|
&GuideUserToSetupKasmPasswdUser();
|
||||||
|
@kasmPasswdUsers = &LoadKasmPasswdUsers();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user