allow the client to request its preferred username even if webapp-wide auth is enabled since some VMs might not support auth
This commit is contained in:
parent
837a34d8cc
commit
70a2f9cc4e
|
|
@ -429,7 +429,7 @@ async function openVM(vm: VM): Promise<void> {
|
|||
|
||||
// Connect to node
|
||||
chatMessage('', `<b>${vm.id}</b><hr>`);
|
||||
let username = Config.Auth.Enabled ? null : localStorage.getItem('username');
|
||||
let username = Config.Auth.Enabled ? (auth!.account?.username ?? null) : localStorage.getItem('username');
|
||||
let connected = await VM.connect(vm.id, username);
|
||||
elements.adminInputVMID.value = vm.id;
|
||||
w.VMName = vm.id;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user