equal
deleted
inserted
replaced
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 |