Skip to content

Commit

Permalink
fix: Remove workflow execution credential error message when instance…
Browse files Browse the repository at this point in the history
… owner (#6116)

fix: remove execution credential error message when instance owner
  • Loading branch information
alexgrozav committed May 16, 2023
1 parent ebb3aaf commit e81a964
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/editor-ui/src/mixins/nodeHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export const nodeHelpers = defineComponent({
useNodeTypesStore,
useSettingsStore,
useWorkflowsStore,
useUsersStore,
),
},
methods: {
Expand Down Expand Up @@ -355,9 +356,10 @@ export const nodeHelpers = defineComponent({
}

if (nameMatches.length === 0) {
const isInstanceOwner = this.usersStore.isInstanceOwner;
const isCredentialUsedInWorkflow =
this.workflowsStore.usedCredentials?.[selectedCredentials.id as string];
if (!isCredentialUsedInWorkflow) {
if (!isCredentialUsedInWorkflow && !isInstanceOwner) {
foundIssues[credentialTypeDescription.name] = [
this.$locale.baseText('nodeIssues.credentials.doNotExist', {
interpolate: { name: selectedCredentials.name, type: credentialDisplayName },
Expand Down

0 comments on commit e81a964

Please sign in to comment.