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(() => {
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 {