catch unauthorized when executing rql to check an rql expression. Fix #968824 stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 17 May 2010 17:31:29 +0200
branchstable
changeset 5531 0ce62ac0d1d7
parent 5530 da21e3fbe240
child 5532 1fa6e09605a5
catch unauthorized when executing rql to check an rql expression. Fix #968824
schema.py
--- a/schema.py	Mon May 17 17:30:52 2010 +0200
+++ b/schema.py	Mon May 17 17:31:29 2010 +0200
@@ -866,6 +866,11 @@
                 if self.eid is not None:
                     session.local_perm_cache[key] = False
                 return False
+            except Unauthorized, ex:
+                self.debug('unauthorized %s: %s', rql, str(ex))
+                if self.eid is not None:
+                    session.local_perm_cache[key] = False
+                return False
         else:
             rset = session.eid_rset(kwargs[keyarg])
         # if no special has_*_permission relation in the rql expression, just