equal
deleted
inserted
replaced
869 """return a list of (relation schema, role) to edit for the entity""" |
869 """return a list of (relation schema, role) to edit for the entity""" |
870 if self.display_fields is not None: |
870 if self.display_fields is not None: |
871 schema = self._cw.vreg.schema |
871 schema = self._cw.vreg.schema |
872 for rtype, role in self.display_fields: |
872 for rtype, role in self.display_fields: |
873 yield (schema[rtype], role) |
873 yield (schema[rtype], role) |
|
874 return |
874 if self.edited_entity.has_eid() and not self.edited_entity.cw_has_perm('update'): |
875 if self.edited_entity.has_eid() and not self.edited_entity.cw_has_perm('update'): |
875 return |
876 return |
876 action = 'update' if self.edited_entity.has_eid() else 'add' |
877 action = 'update' if self.edited_entity.has_eid() else 'add' |
877 for rtype, _, role in self._relations_by_section('attributes', action, strict): |
878 for rtype, _, role in self._relations_by_section('attributes', action, strict): |
878 yield (rtype, role) |
879 yield (rtype, role) |