refactor(core): Continue moving typeorm operators to repositories (no-changelog) (#8186)

Follow-up to: #8163
This commit is contained in:
Iván Ovejero
2024-01-02 17:53:24 +01:00
committed by GitHub
parent 0ca2759d75
commit 40c1eeeddd
35 changed files with 341 additions and 354 deletions

View File

@@ -386,10 +386,14 @@ workflowsController.put(
workflow = undefined;
// Allow owners/admins to share
if (req.user.hasGlobalScope('workflow:share')) {
const sharedRes = await Container.get(WorkflowService).getSharing(req.user, workflowId, {
allowGlobalScope: true,
globalScope: 'workflow:share',
});
const sharedRes = await Container.get(SharedWorkflowRepository).getSharing(
req.user,
workflowId,
{
allowGlobalScope: true,
globalScope: 'workflow:share',
},
);
workflow = sharedRes?.workflow;
}
if (!workflow) {