diff options
-rw-r--r-- | server/user_session.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/server/user_session.py b/server/user_session.py index 900238c..63d3459 100644 --- a/server/user_session.py +++ b/server/user_session.py @@ -64,6 +64,7 @@ class UserSession(object): self.sid = uuid.uuid4().hex self.uid = None self.username = None + self.is_admin = False self._lang_session = None self.settings = {} self.last_access = int(time.time()) # resolution: 1 second @@ -93,6 +94,7 @@ class UserSession(object): cur.execute('update codeq_user set last_login = %s where id = %s', (str(now), row[0],)) self.uid = row[0] self.username = username + self.is_admin = row[4] self.settings = {'gui_lang': row[6], 'robot_address': row[7], 'gui_layout': row[8]} return row[2], row[3], row[4], row[5], now else: @@ -219,6 +221,7 @@ class UserSession(object): username = self.username self.uid = None self.username = None + self.is_admin = False self.settings = {} if lang_session is not None: # do not handle the language session holding the lock: we may deadlock if the callee calls the caller lang_session.destroy() |