Credentials
diff --git a/packages/editor-ui/src/components/ParameterInput.vue b/packages/editor-ui/src/components/ParameterInput.vue
index 336e27041a..5f77346c3f 100644
--- a/packages/editor-ui/src/components/ParameterInput.vue
+++ b/packages/editor-ui/src/components/ParameterInput.vue
@@ -240,10 +240,6 @@ export default mixins(
return returnValues.join('|');
},
node (): INodeUi | null {
- if (this.isCredential === true) {
- return null;
- }
-
return this.$store.getters.activeNode;
},
displayTitle (): string {
@@ -314,7 +310,7 @@ export default mixins(
return false;
},
expressionValueComputed (): NodeParameterValue | null {
- if (this.isCredential === true || this.node === null) {
+ if (this.node === null) {
return null;
}
diff --git a/packages/workflow/src/Interfaces.ts b/packages/workflow/src/Interfaces.ts
index b030920309..d94fca3aa1 100644
--- a/packages/workflow/src/Interfaces.ts
+++ b/packages/workflow/src/Interfaces.ts
@@ -84,6 +84,15 @@ export interface ICredentialsEncrypted {
data?: string;
}
+export interface ICredentialsExpressionResolveValues {
+ connectionInputData: INodeExecutionData[];
+ itemIndex: number;
+ node: INode;
+ runExecutionData: IRunExecutionData | null;
+ runIndex: number;
+ workflow: Workflow;
+}
+
export abstract class ICredentialsHelper {
encryptionKey: string;
workflowCredentials: IWorkflowCredentials;
@@ -94,7 +103,7 @@ export abstract class ICredentialsHelper {
}
abstract getCredentials(name: string, type: string): ICredentials;
- abstract getDecrypted(name: string, type: string): ICredentialDataDecryptedObject;
+ abstract getDecrypted(name: string, type: string, raw?: boolean, expressionResolveValues?: ICredentialsExpressionResolveValues): ICredentialDataDecryptedObject;
abstract updateCredentials(name: string, type: string, data: ICredentialDataDecryptedObject): Promise
;
}
@@ -203,7 +212,7 @@ export interface IExecuteFunctions {
evaluateExpression(expression: string, itemIndex: number): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[];
executeWorkflow(workflowInfo: IExecuteWorkflowInfo, inputData?: INodeExecutionData[]): Promise; // tslint:disable-line:no-any
getContext(type: string): IContextObject;
- getCredentials(type: string): ICredentialDataDecryptedObject | undefined;
+ getCredentials(type: string, itemIndex?: number): ICredentialDataDecryptedObject | undefined;
getInputData(inputIndex?: number, inputName?: string): INodeExecutionData[];
getMode(): WorkflowExecuteMode;
getNode(): INode;