fix: Allow sharee to use workflows with http request node without credential access (#8841)

This commit is contained in:
Omar Ajoue 2024-03-11 09:43:30 +00:00 committed by GitHub
parent a3a931bdd1
commit bde4c6c7a1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -373,8 +373,15 @@ export function useNodeHelpers() {
node.credentials !== undefined
) {
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);
return credential ? reportUnsetCredential(credential) : null;
}