fix(editor): Credentials scopes and n8n scopes mix up (#10930)

This commit is contained in:
Raúl Gómez Morales 2024-09-25 08:38:15 +02:00 committed by GitHub
parent 6de4dfff87
commit e069608022
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -280,8 +280,7 @@ const requiredPropertiesFilled = computed(() => {
const credentialPermissions = computed(() => { const credentialPermissions = computed(() => {
return getResourcePermissions( return getResourcePermissions(
((credentialId.value ? currentCredential.value : credentialData.value) as ICredentialsResponse) (currentCredential.value as ICredentialsResponse)?.scopes ?? homeProject.value?.scopes,
?.scopes,
).credential; ).credential;
}); });
@ -341,11 +340,8 @@ onMounted(async () => {
credentialTypeName: defaultCredentialTypeName.value, credentialTypeName: defaultCredentialTypeName.value,
}); });
const scopes = homeProject.value?.scopes ?? [];
credentialData.value = { credentialData.value = {
...credentialData.value, ...credentialData.value,
scopes,
...(homeProject.value ? { homeProject: homeProject.value } : {}), ...(homeProject.value ? { homeProject: homeProject.value } : {}),
}; };
} else { } else {