backport stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 06 Jul 2010 13:55:10 +0200
changeset 5904 6371b6760dc9
parent 5902 c344b3079a2d (current diff)
parent 5903 aa01eb033620 (diff)
child 5905 ed66f5a8d48a
backport stable
selectors.py
--- a/selectors.py	Tue Jul 06 11:34:23 2010 +0200
+++ b/selectors.py	Tue Jul 06 13:55:10 2010 +0200
@@ -907,7 +907,8 @@
             elif not rschema.has_perm(entity._cw, self.action, toeid=entity.eid):
                 return 0
         if self.target_etype is not None:
-            teschema = entity._cw.vreg.schema.eschema(self.target_etype)
+            req = entity._cw
+            teschema = req.vreg.schema.eschema(self.target_etype)
             if not teschema.may_have_permission('read', req):
                 return 0
         return 1