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:
@@ -0,0 +1,18 @@
|
||||
export const canObjectBeManagedByWorkflow = ({
|
||||
nameSingular,
|
||||
isSystem,
|
||||
}: {
|
||||
nameSingular: string;
|
||||
isSystem: boolean;
|
||||
}) => {
|
||||
const excludedNonSystemObjectMetadataItemNames = [
|
||||
'workflow',
|
||||
'workflowVersion',
|
||||
'workflowRun',
|
||||
'dashboard',
|
||||
];
|
||||
|
||||
return !excludedNonSystemObjectMetadataItemNames.includes(
|
||||
nameSingular,
|
||||
) && !isSystem;
|
||||
};
|
||||
Reference in New Issue
Block a user