Make workflow objects read only in frontend (#7545)

Expected behavior:
- workflows can be added and deleted. Only name field is editable
- versions and runs cannot be added nor deleted. No fields are editable

Added two new utils for those needs:
- `isReadOnlyObject` the similar logic between remote objects, versions
and runs
- `isFieldReadonlyFromObjectMetadataName` to easily block field edition
from object context
This commit is contained in:
Thomas Trompette
2024-10-10 15:29:43 +02:00
committed by GitHub
parent 66a483c332
commit c055d167f2
16 changed files with 190 additions and 112 deletions

View File

@ -1,5 +0,0 @@
import { ObjectMetadataItem } from '@/object-metadata/types/ObjectMetadataItem';
export const useObjectIsRemote = (objectMetadataItem: ObjectMetadataItem) => {
return objectMetadataItem.isRemote ?? false;
};