Skip to content

Commit dae0395

Browse files
persist console endpoint creator domain ID
1 parent 3c62f66 commit dae0395

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

server/src/main/java/org/apache/cloudstack/consoleproxy/ConsoleAccessManagerImpl.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,10 +468,13 @@ private ConsoleEndpoint composeConsoleAccessEndpoint(String rootUrl, VirtualMach
468468
}
469469

470470
protected void persistConsoleSession(String sessionUuid, long instanceId, long hostId, String consoleEndpointCreatorAddress) {
471+
CallContext caller = CallContext.current();
472+
471473
ConsoleSessionVO consoleSessionVo = new ConsoleSessionVO();
472474
consoleSessionVo.setUuid(sessionUuid);
473-
consoleSessionVo.setAccountId(CallContext.current().getCallingAccountId());
474-
consoleSessionVo.setUserId(CallContext.current().getCallingUserId());
475+
consoleSessionVo.setDomainId(caller.getCallingAccount().getDomainId());
476+
consoleSessionVo.setAccountId(caller.getCallingAccountId());
477+
consoleSessionVo.setUserId(caller.getCallingUserId());
475478
consoleSessionVo.setInstanceId(instanceId);
476479
consoleSessionVo.setHostId(hostId);
477480
consoleSessionVo.setConsoleEndpointCreatorAddress(consoleEndpointCreatorAddress);

0 commit comments

Comments
 (0)