feat(editor): Add correct credential owner contact details for readonly credentials (#5208)

* feat: add correct credential owner contact details for readonly credentials

* chore: remove unnecessary translation

* fix: update credential owner name to be retrieved using usedCredentials

* fix: correct credentialownername getter typing
This commit is contained in:
Alex Grozav
2023-02-14 16:13:22 +02:00
committed by GitHub
parent 246189f6da
commit 36108f82a1
6 changed files with 54 additions and 17 deletions

View File

@@ -93,7 +93,7 @@
:dragging="isDragging"
:sessionId="sessionId"
:nodeType="activeNodeType"
:hasForeignCredential="hasForeignCredential"
:foreignCredentials="foreignCredentials"
:readOnly="readOnly"
:blockUI="blockUi && showTriggerPanel"
:executable="!readOnly"
@@ -375,11 +375,11 @@ export default mixins(
blockUi(): boolean {
return this.isWorkflowRunning || this.isExecutionWaitingForWebhook;
},
hasForeignCredential(): boolean {
foreignCredentials(): string[] {
const credentials = (this.activeNode || {}).credentials;
const usedCredentials = this.workflowsStore.usedCredentials;
let hasForeignCredential = false;
const foreignCredentials: string[] = [];
if (
credentials &&
this.settingsStore.isEnterpriseFeatureEnabled(EnterpriseEditionFeature.Sharing)
@@ -390,12 +390,15 @@ export default mixins(
usedCredentials[credential.id] &&
!usedCredentials[credential.id].currentUserHasAccess
) {
hasForeignCredential = true;
foreignCredentials.push(credential.id);
}
});
}
return hasForeignCredential;
return foreignCredentials;
},
hasForeignCredential(): boolean {
return this.foreignCredentials.length > 0;
},
},
watch: {