server/querier.py
branchstable
changeset 4719 aaed3f813ef8
parent 4654 717310b3d576
child 4722 9c13d5db03d9
equal deleted inserted replaced
4718:3dc3ad02d091 4719:aaed3f813ef8
    10 
    10 
    11 from itertools import repeat
    11 from itertools import repeat
    12 
    12 
    13 from logilab.common.cache import Cache
    13 from logilab.common.cache import Cache
    14 from logilab.common.compat import any
    14 from logilab.common.compat import any
    15 from rql import RQLHelper, RQLSyntaxError
    15 from rql import RQLSyntaxError
    16 from rql.stmts import Union, Select
    16 from rql.stmts import Union, Select
    17 from rql.nodes import Relation, VariableRef, Constant, SubQuery
    17 from rql.nodes import Relation, VariableRef, Constant, SubQuery
    18 
    18 
    19 from cubicweb import Unauthorized, QueryError, UnknownEid, typed_eid
    19 from cubicweb import Unauthorized, QueryError, UnknownEid, typed_eid
    20 from cubicweb import server
    20 from cubicweb import server
   208         set_qdata(self.schema.rschema, union, noinvariant)
   208         set_qdata(self.schema.rschema, union, noinvariant)
   209         if union.has_text_query:
   209         if union.has_text_query:
   210             self.cache_key = None
   210             self.cache_key = None
   211 
   211 
   212     def _insert_security(self, union, noinvariant):
   212     def _insert_security(self, union, noinvariant):
   213         rh = self.rqlhelper
       
   214         for select in union.children[:]:
   213         for select in union.children[:]:
   215             for subquery in select.with_:
   214             for subquery in select.with_:
   216                 self._insert_security(subquery.query, noinvariant)
   215                 self._insert_security(subquery.query, noinvariant)
   217             localchecks, restricted = self._check_permissions(select)
   216             localchecks, restricted = self._check_permissions(select)
   218             if any(localchecks):
   217             if any(localchecks):