mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
fix: Allow sharee to use workflows with http request node without credential access (#8841)
This commit is contained in:
parent
a3a931bdd1
commit
bde4c6c7a1
|
@ -373,8 +373,15 @@ export function useNodeHelpers() {
|
||||||
node.credentials !== undefined
|
node.credentials !== undefined
|
||||||
) {
|
) {
|
||||||
const stored = credentialsStore.getCredentialsByType(nodeCredentialType);
|
const stored = credentialsStore.getCredentialsByType(nodeCredentialType);
|
||||||
|
// 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)) {
|
if (
|
||||||
|
selectedCredsDoNotExist(node, nodeCredentialType, stored) &&
|
||||||
|
!isCredentialUsedInWorkflow
|
||||||
|
) {
|
||||||
const credential = credentialsStore.getCredentialTypeByName(nodeCredentialType);
|
const credential = credentialsStore.getCredentialTypeByName(nodeCredentialType);
|
||||||
return credential ? reportUnsetCredential(credential) : null;
|
return credential ? reportUnsetCredential(credential) : null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue