feat: Enable cred setup for workflows created from templates (no-changelog) (#8240)
## Summary Enable users to open credential setup for workflows that have been created from templates if they skip it. Next steps (will be their own PRs): - Add telemetry events - Add e2e test - Hide the button when user sets up all the credentials - Change the feature flag to a new one ## Related tickets and issues https://linear.app/n8n/issue/ADO-1637/feature-support-template-credential-setup-for-http-request-nodes-that
This commit is contained in:
@@ -31,3 +31,12 @@ export function getNodeTypeDisplayableCredentials(
|
||||
|
||||
return displayableCredentials;
|
||||
}
|
||||
|
||||
export function doesNodeHaveCredentialsToFill(
|
||||
nodeTypeProvider: NodeTypeProvider,
|
||||
node: Pick<INodeUi, 'parameters' | 'type' | 'typeVersion'>,
|
||||
): boolean {
|
||||
const requiredCredentials = getNodeTypeDisplayableCredentials(nodeTypeProvider, node);
|
||||
|
||||
return requiredCredentials.length > 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user