diff options
-rw-r--r-- | server/handlers.py | 5 | ||||
-rw-r--r-- | server/user_session.py | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/server/handlers.py b/server/handlers.py index b59b282..5e06463 100644 --- a/server/handlers.py +++ b/server/handlers.py @@ -55,7 +55,7 @@ class Login(CodeqService): username = js.get('username') password = js.get('password') try: - name, email, is_admin, date_joined, last_login = request.session.login(username, password) + name, email, is_admin, date_joined, last_login, experiments = request.session.login(username, password) except AuthenticationFailed: request.reply({'code': 1, 'message': 'Wrong username or password'}) else: @@ -69,7 +69,8 @@ class Login(CodeqService): 'admin': is_admin, 'joined': date_joined.isoformat(), 'last-login': last_login.isoformat(), - 'settings': settings + 'settings': settings, + 'experiments': experiments, }) diff --git a/server/user_session.py b/server/user_session.py index 21c3009..52b6c9d 100644 --- a/server/user_session.py +++ b/server/user_session.py @@ -98,7 +98,7 @@ class UserSession(object): self.is_admin = row[4] self.settings = {'gui_lang': row[6], 'robot_address': row[7], 'gui_layout': row[8]} self.experiments = row[9] if row[9] else [] - return row[2], row[3], row[4], row[5], now + return row[2], row[3], row[4], row[5], now, self.experiments else: raise AuthenticationFailed('Password mismatch') finally: |