selectors.py
branchstable
changeset 5903 aa01eb033620
parent 5900 002af94623d3
child 5904 6371b6760dc9
--- a/selectors.py	Tue Jul 06 11:31:04 2010 +0200
+++ b/selectors.py	Tue Jul 06 13:54:57 2010 +0200
@@ -864,7 +864,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