Add smarter shared login on website/webclient. Resolves #1063.

This makes it so that logging into the website will auto-log you
into the webclient and vice-versa when you refresh the page. But if
you log out of the web client will have to manually log in again. If
you log out of the website and reload the webclient page you will have
to log back into the client too (this is because logging out of the
website flushes the browser session, it doesn't seem worth the effort
to override django.auth in this).
This commit is contained in:
Griatch 2017-08-20 20:36:35 +02:00
parent 0ac190b6ea
commit cdac9678b9
7 changed files with 20 additions and 67 deletions

View file

@ -476,7 +476,8 @@ class ServerSessionHandler(SessionHandler):
if not testmode:
self.server.amp_protocol.send_AdminServer2Portal(session,
operation=SLOGIN,
sessiondata={"logged_in": True})
sessiondata={"logged_in": True,
"uid": session.uid})
account.at_post_login(session=session)
def disconnect(self, session, reason="", sync_portal=True):