equal
deleted
inserted
replaced
862 if not rschema.has_perm(entity._cw, self.action, fromeid=entity.eid): |
862 if not rschema.has_perm(entity._cw, self.action, fromeid=entity.eid): |
863 return 0 |
863 return 0 |
864 elif not rschema.has_perm(entity._cw, self.action, toeid=entity.eid): |
864 elif not rschema.has_perm(entity._cw, self.action, toeid=entity.eid): |
865 return 0 |
865 return 0 |
866 if self.target_etype is not None: |
866 if self.target_etype is not None: |
867 teschema = entity._cw.vreg.schema.eschema(self.target_etype) |
867 req = entity._cw |
|
868 teschema = req.vreg.schema.eschema(self.target_etype) |
868 if not teschema.may_have_permission('read', req): |
869 if not teschema.may_have_permission('read', req): |
869 return 0 |
870 return 0 |
870 return 1 |
871 return 1 |
871 |
872 |
872 |
873 |