--- a/server/session.py Wed Sep 02 16:42:07 2009 +0200
+++ b/server/session.py Thu Sep 10 08:13:22 2009 +0200
@@ -75,6 +75,12 @@
return '<%ssession %s (%s 0x%x)>' % (self.cnxtype, self.user.login,
self.id, id(self))
+ def hijack_user(self, user):
+ """return a fake request/session using specified user"""
+ session = Session(user, self.repo)
+ session._threaddata = self.actual_session()._threaddata
+ return session
+
def _change_relation(self, cb, fromeid, rtype, toeid):
if self.is_super_session:
cb(self, fromeid, rtype, toeid)
@@ -112,6 +118,8 @@
self._change_relation(self.repo.glob_delete_relation,
fromeid, rtype, toeid)
+ # relations cache handling #################################################
+
def update_rel_cache_add(self, subject, rtype, object, symetric=False):
self._update_entity_rel_cache_add(subject, rtype, 'subject', object)
if symetric: