Skip to content

Commit

Permalink
fix: Allow sharee to use workflows with http request node without cre…
Browse files Browse the repository at this point in the history
…dential access (n8n-io#8841)
  • Loading branch information
krynble authored Mar 11, 2024
1 parent a3a931b commit bde4c6c
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions packages/editor-ui/src/composables/useNodeHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,15 @@ export function useNodeHelpers() {
node.credentials !== undefined
) {
const stored = credentialsStore.getCredentialsByType(nodeCredentialType);

if (selectedCredsDoNotExist(node, nodeCredentialType, stored)) {
// Prevents HTTP Request node from being unusable if a sharee does not have direct
// access to a credential
const isCredentialUsedInWorkflow =
workflowsStore.usedCredentials?.[node.credentials?.[nodeCredentialType]?.id as string];

if (
selectedCredsDoNotExist(node, nodeCredentialType, stored) &&
!isCredentialUsedInWorkflow
) {
const credential = credentialsStore.getCredentialTypeByName(nodeCredentialType);
return credential ? reportUnsetCredential(credential) : null;
}
Expand Down

0 comments on commit bde4c6c

Please sign in to comment.