server/querier.py
changeset 8562 0d2fb4604265
parent 8542 7e264ce34cd4
child 8694 d901c36bcfce
--- a/server/querier.py	Thu Sep 20 14:50:06 2012 +0200
+++ b/server/querier.py	Fri Sep 14 14:15:39 2012 +0200
@@ -42,7 +42,6 @@
 from cubicweb.server.rqlannotation import SQLGenAnnotator, set_qdata
 from cubicweb.server.ssplanner import READ_ONLY_RTYPES, add_types_restriction
 from cubicweb.server.edition import EditedEntity
-from cubicweb.server.session import security_enabled
 
 
 ETYPE_PYOBJ_MAP[Binary] = 'Bytes'
@@ -262,7 +261,7 @@
                 cached = True
             else:
                 noinvariant = set()
-                with security_enabled(self.session, read=False):
+                with self.session.security_enabled(read=False):
                     self._insert_security(union, noinvariant)
                 if key is not None:
                     self.session.transaction_data[key] = (union, self.args)