equal
deleted
inserted
replaced
249 def user_groups_session(self, *groups): |
249 def user_groups_session(self, *groups): |
250 """lightweight session using the current user with hi-jacked groups""" |
250 """lightweight session using the current user with hi-jacked groups""" |
251 # use cnx.user.eid to get correct owned_by relation, unless explicit eid |
251 # use cnx.user.eid to get correct owned_by relation, unless explicit eid |
252 with self.admin_access.cnx() as cnx: |
252 with self.admin_access.cnx() as cnx: |
253 user_eid = cnx.user.eid |
253 user_eid = cnx.user.eid |
254 cnx.user._cw.data[user_session_cache_key(user_eid, 'groups')] = set(groups) |
254 cnx.user._cw.transaction_data[user_session_cache_key(user_eid, 'groups')] = set(groups) |
255 yield cnx |
255 yield cnx |
256 |
256 |
257 def qexecute(self, rql, args=None, build_descr=True): |
257 def qexecute(self, rql, args=None, build_descr=True): |
258 with self.admin_access.cnx() as cnx: |
258 with self.admin_access.cnx() as cnx: |
259 try: |
259 try: |