dbapi.py
branchstable
changeset 3112 873202e181bb
parent 2665 0c6281487f90
child 3163 edfe43ceaa35
child 3258 6536ee4f37f7
equal deleted inserted replaced
3109:e7e1bb06b716 3112:873202e181bb
   281         repository side.
   281         repository side.
   282         """
   282         """
   283         return self.cnx.set_shared_data(key, value, querydata)
   283         return self.cnx.set_shared_data(key, value, querydata)
   284 
   284 
   285     # server session compat layer #############################################
   285     # server session compat layer #############################################
       
   286 
       
   287     def hijack_user(self, user):
       
   288         """return a fake request/session using specified user"""
       
   289         req = DBAPIRequest(self.vreg)
       
   290         req.set_connection(self.cnx, user)
       
   291         return req
   286 
   292 
   287     @property
   293     @property
   288     def user(self):
   294     def user(self):
   289         if self._user is None and self.cnx:
   295         if self._user is None and self.cnx:
   290             self.set_user(self.cnx.user(self, {'lang': self.lang}))
   296             self.set_user(self.cnx.user(self, {'lang': self.lang}))