Restrict workflow object permissions (#14290)

- workflows should not edit system objects or workflow related objects
- system fields should be usable within variables for reading
This commit is contained in:
Thomas Trompette
2025-09-04 10:39:51 +02:00
committed by GitHub
parent 6e570ba6c8
commit d6ba6a66a4
10 changed files with 109 additions and 32 deletions
@@ -0,0 +1,18 @@
export const canObjectBeManagedByWorkflow = ({
nameSingular,
isSystem,
}: {
nameSingular: string;
isSystem: boolean;
}) => {
const excludedNonSystemObjectMetadataItemNames = [
'workflow',
'workflowVersion',
'workflowRun',
'dashboard',
];
return !excludedNonSystemObjectMetadataItemNames.includes(
nameSingular,
) && !isSystem;
};