From e0696080227aee7ccb50d51a82873e8a1ba4667d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20G=C3=B3mez=20Morales?= Date: Wed, 25 Sep 2024 08:38:15 +0200 Subject: [PATCH] fix(editor): Credentials scopes and n8n scopes mix up (#10930) --- .../src/components/CredentialEdit/CredentialEdit.vue | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/editor-ui/src/components/CredentialEdit/CredentialEdit.vue b/packages/editor-ui/src/components/CredentialEdit/CredentialEdit.vue index 856f0c9315..ba3eb19ff0 100644 --- a/packages/editor-ui/src/components/CredentialEdit/CredentialEdit.vue +++ b/packages/editor-ui/src/components/CredentialEdit/CredentialEdit.vue @@ -280,8 +280,7 @@ const requiredPropertiesFilled = computed(() => { const credentialPermissions = computed(() => { return getResourcePermissions( - ((credentialId.value ? currentCredential.value : credentialData.value) as ICredentialsResponse) - ?.scopes, + (currentCredential.value as ICredentialsResponse)?.scopes ?? homeProject.value?.scopes, ).credential; }); @@ -341,11 +340,8 @@ onMounted(async () => { credentialTypeName: defaultCredentialTypeName.value, }); - const scopes = homeProject.value?.scopes ?? []; - credentialData.value = { ...credentialData.value, - scopes, ...(homeProject.value ? { homeProject: homeProject.value } : {}), }; } else {