Refactor isReadOnly + introduce restrictedFields (#13533)
Closes https://github.com/twentyhq/core-team-issues/issues/1276 We now need to take fields permissions into account when determining if a cell is editable or not. a record field (= a cell) is read only if one of the condition is met: - the object of the record is read-only (can be determined at table level) by permission setting - the field of the object is read-only (can be determined at column level) - either by permission settings or by system (some workflows fields for intance) - the record is deleted (can be determined at row level) we reorganized the code to avoid re-computing known information as much as possible. --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
+1
-1
@@ -150,7 +150,7 @@ export const SettingsDataModelFieldPreview = ({
|
||||
},
|
||||
defaultValue: fieldMetadataItem.defaultValue,
|
||||
},
|
||||
isReadOnly: false,
|
||||
isRecordFieldReadOnly: false,
|
||||
disableChipClick: true,
|
||||
}}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user