mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
refactor: Adjust credential endpoints permissions (#4656) (no-changelog)
* refactor: Adjust credential endpoints permissions
This commit is contained in:
@@ -247,13 +247,14 @@ EEWorkflowController.post(
|
||||
const workflow = new WorkflowEntity();
|
||||
Object.assign(workflow, req.body.workflowData);
|
||||
|
||||
const safeWorkflow = await EEWorkflows.preventTampering(
|
||||
workflow,
|
||||
workflow.id.toString(),
|
||||
req.user,
|
||||
);
|
||||
|
||||
req.body.workflowData.nodes = safeWorkflow.nodes;
|
||||
if (workflow.id !== undefined) {
|
||||
const safeWorkflow = await EEWorkflows.preventTampering(
|
||||
workflow,
|
||||
workflow.id.toString(),
|
||||
req.user,
|
||||
);
|
||||
req.body.workflowData.nodes = safeWorkflow.nodes;
|
||||
}
|
||||
|
||||
return EEWorkflows.runManually(req.body, req.user, GenericHelpers.getSessionId(req));
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user