feat: also send credentials when returning workflow via API (#4458) (no-changelog)

This commit is contained in:
Omar Ajoue
2022-10-31 11:08:25 -03:00
committed by GitHub
parent ec5ef0c50d
commit 7563d450f9
6 changed files with 184 additions and 10 deletions

View File

@@ -89,9 +89,11 @@ EEWorkflowController.get(
if (!userSharing && req.user.globalRole.name !== 'owner') {
throw new ResponseHelper.ResponseError(`Forbidden.`, undefined, 403);
}
// @TODO: also return the credentials used by the workflow
return EEWorkflows.addOwnerAndSharings(workflow);
return EEWorkflows.addCredentialsToWorkflow(
EEWorkflows.addOwnerAndSharings(workflow),
req.user,
);
}),
);