selectors.py
changeset 5904 6371b6760dc9
parent 5901 782b27eaf97a
parent 5903 aa01eb033620
child 5944 b962dff47c36
--- 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