server/session.py
changeset 9088 04ceb4268b3b
parent 9087 dd26b4f95f90
child 9089 b4c12d2873f6
--- a/server/session.py	Tue Jun 25 14:13:50 2013 +0200
+++ b/server/session.py	Tue Jun 25 17:42:12 2013 +0200
@@ -431,11 +431,6 @@
         self.vreg = self.repo.vreg
         self._execute = self.repo.querier.execute
 
-        # other session utility
-        self.user = session.user # XXX migrate to self._set_user when
-        self.lang = session.lang # Connection gain execute
-
-
         #: connection handling mode
         self.mode = session.default_mode
         #: connection set used to execute queries on sources
@@ -476,6 +471,11 @@
         # RQLRewriter are not thread safe
         self._rewriter = rewriter
 
+        # other session utility
+        if session.user.login == '__internal_manager__':
+            self.user = session.user
+        else:
+            self._set_user(session.user)
 
     # shared data handling ###################################################