Skip to content
Snippets Groups Projects
Commit c52ca87d authored by buczekp's avatar buczekp
Browse files

[LMS-2176] minor: fast logout when user changes anonymous flag in URL

SVN: 20666
parent f65722fa
No related branches found
No related tags found
No related merge requests found
...@@ -473,13 +473,15 @@ public abstract class AbstractClientService implements IClientService, ...@@ -473,13 +473,15 @@ public abstract class AbstractClientService implements IClientService,
{ {
try try
{ {
final SessionContextDTO session = getServer().tryGetSession(getSessionToken()); final String sessionToken = getSessionToken();
final SessionContextDTO session = getServer().tryGetSession(sessionToken);
if (session == null) if (session == null)
{ {
return null; return null;
} else if (anonymous != session.isAnonymous()) } else if (anonymous != session.isAnonymous())
{ {
operationLog.debug("expected: " + anonymous + " found: " + session.isAnonymous()); operationLog.debug("expected: " + anonymous + " found: " + session.isAnonymous());
getServer().logout(sessionToken);
return null; return null;
} }
return createSessionContext(session); return createSessionContext(session);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment