fix(editor): Fix credential errors in executions view for workflow sharee (#6875)

This commit is contained in:
Alex Grozav 2023-08-08 18:34:36 +03:00 committed by GitHub
parent 9139e64e22
commit a0f9b2eefe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 0 deletions

View file

@ -361,6 +361,7 @@ export const nodeHelpers = defineComponent({
const isInstanceOwner = this.usersStore.isInstanceOwner;
const isCredentialUsedInWorkflow =
this.workflowsStore.usedCredentials?.[selectedCredentials.id as string];
if (!isCredentialUsedInWorkflow && !isInstanceOwner) {
foundIssues[credentialTypeDescription.name] = [
this.$locale.baseText('nodeIssues.credentials.doNotExist', {

View file

@ -776,6 +776,24 @@ export default defineComponent({
this.workflowsStore.setWorkflowPinData(data.workflowData.pinData);
}
if (data.workflowData.ownedBy) {
this.workflowsEEStore.setWorkflowOwnedBy({
workflowId: data.workflowData.id,
ownedBy: data.workflowData.ownedBy,
});
}
if (data.workflowData.sharedWith) {
this.workflowsEEStore.setWorkflowSharedWith({
workflowId: data.workflowData.id,
sharedWith: data.workflowData.sharedWith,
});
}
if (data.workflowData.usedCredentials) {
this.workflowsStore.setUsedCredentials(data.workflowData.usedCredentials);
}
await this.addNodes(
deepCopy(data.workflowData.nodes),
deepCopy(data.workflowData.connections),