mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix: Apply credential overwrites recursively (#5072)
This ensures that overwrites defined for a parent credential type also applies to all credentials extending it.
This commit is contained in:
committed by
GitHub
parent
f1184ccab5
commit
5d746c4a83
@@ -247,18 +247,7 @@ export class CredentialsHelper extends ICredentialsHelper {
|
||||
* Returns all parent types of the given credential type
|
||||
*/
|
||||
getParentTypes(typeName: string): string[] {
|
||||
const credentialType = this.credentialTypes.getByName(typeName);
|
||||
|
||||
if (credentialType === undefined || credentialType.extends === undefined) {
|
||||
return [];
|
||||
}
|
||||
|
||||
let types: string[] = [];
|
||||
credentialType.extends.forEach((type: string) => {
|
||||
types = [...types, type, ...this.getParentTypes(type)];
|
||||
});
|
||||
|
||||
return types;
|
||||
return this.credentialTypes.getParentTypes(typeName);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user