mirror of
https://gitee.com/jmix/cuba.git
synced 2024-12-05 04:38:10 +08:00
PL-6104 Fix user substitutions
This commit is contained in:
parent
d3ce145e90
commit
dae9abc1ff
@ -45,7 +45,10 @@ public class Connection {
|
||||
|
||||
public void login(String login, String password, Locale locale) throws LoginException {
|
||||
UserSession userSession = doLogin(login, password, locale, getLoginParams());
|
||||
session = new ClientUserSession(userSession);
|
||||
ClientUserSession clientUserSession = new ClientUserSession(userSession);
|
||||
clientUserSession.setAuthenticated(true);
|
||||
|
||||
session = clientUserSession;
|
||||
AppContext.setSecurityContext(new SecurityContext(session));
|
||||
log.info("Logged in: " + session);
|
||||
|
||||
|
@ -188,7 +188,11 @@ public abstract class AbstractConnection implements Connection {
|
||||
|
||||
@Override
|
||||
public void substituteUser(User substitutedUser) {
|
||||
setSession(new ClientUserSession(loginService.substituteUser(substitutedUser)));
|
||||
ClientUserSession clientUserSession = new ClientUserSession(loginService.substituteUser(substitutedUser));
|
||||
clientUserSession.setAuthenticated(true);
|
||||
|
||||
setSession(clientUserSession);
|
||||
|
||||
fireSubstitutionListeners();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user