Add used by information.

This commit is contained in:
Michael Lipp 2024-11-14 18:46:19 +01:00
parent 4ea568ea17
commit 0ba8d922ef
7 changed files with 47 additions and 7 deletions

View file

@ -527,9 +527,12 @@ public class VmViewer extends FreeMarkerConlet<VmViewer.ViewerModel> {
break;
case "openConsole":
if (perms.contains(Permission.ACCESS_CONSOLE)) {
var pwQuery = Event.onCompletion(new GetDisplayPassword(vmDef),
e -> openConsole(vmName, channel, model,
e.password().orElse(null)));
var user = WebConsoleUtils.userFromSession(channel.session())
.map(ConsoleUser::getName).orElse("");
var pwQuery
= Event.onCompletion(new GetDisplayPassword(vmDef, user),
e -> openConsole(vmName, channel, model,
e.password().orElse(null)));
fire(pwQuery, vmChannel);
}
break;