selectors.py
changeset 5904 6371b6760dc9
parent 5901 782b27eaf97a
parent 5903 aa01eb033620
child 5944 b962dff47c36
equal deleted inserted replaced
5902:c344b3079a2d 5904:6371b6760dc9
   905                 if not rschema.has_perm(entity._cw, self.action, fromeid=entity.eid):
   905                 if not rschema.has_perm(entity._cw, self.action, fromeid=entity.eid):
   906                     return 0
   906                     return 0
   907             elif not rschema.has_perm(entity._cw, self.action, toeid=entity.eid):
   907             elif not rschema.has_perm(entity._cw, self.action, toeid=entity.eid):
   908                 return 0
   908                 return 0
   909         if self.target_etype is not None:
   909         if self.target_etype is not None:
   910             teschema = entity._cw.vreg.schema.eschema(self.target_etype)
   910             req = entity._cw
       
   911             teschema = req.vreg.schema.eschema(self.target_etype)
   911             if not teschema.may_have_permission('read', req):
   912             if not teschema.may_have_permission('read', req):
   912                 return 0
   913                 return 0
   913         return 1
   914         return 1
   914 
   915 
   915 
   916