From a62c2d45c947eafe74eed3d9583a433e558da19d Mon Sep 17 00:00:00 2001 From: Omar Ajoue Date: Thu, 3 Mar 2022 12:18:50 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix=20access=20for=20instance=20?= =?UTF-8?q?owner=20to=20credentials=20(#2927)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/cli/src/UserManagement/UserManagementHelper.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/cli/src/UserManagement/UserManagementHelper.ts b/packages/cli/src/UserManagement/UserManagementHelper.ts index a2880b6bbc795..18651ab77adb6 100644 --- a/packages/cli/src/UserManagement/UserManagementHelper.ts +++ b/packages/cli/src/UserManagement/UserManagementHelper.ts @@ -106,6 +106,11 @@ export async function checkPermissionsForExecution( workflow: Workflow, userId: string, ): Promise { + const user = await getUserById(userId); + if (user.globalRole.name === 'owner') { + return true; + } + const credentialIds = new Set(); const nodeNames = Object.keys(workflow.nodes); // Iterate over all nodes