fix(editor): Connect up new project viewer role to the FE (#9913)

This commit is contained in:
Csaba Tuncsik
2024-08-13 15:45:28 +02:00
committed by GitHub
parent 56c4692c94
commit 117e2d968f
56 changed files with 1482 additions and 1155 deletions

View File

@@ -130,9 +130,7 @@ import {
WORKFLOW_SHARE_MODAL_KEY,
} from '@/constants';
import type { IUser, IWorkflowDb } from '@/Interface';
import type { PermissionsMap } from '@/permissions';
import type { WorkflowScope } from '@n8n/permissions';
import { getWorkflowPermissions } from '@/permissions';
import { getResourcePermissions } from '@/permissions';
import { useMessage } from '@/composables/useMessage';
import { useToast } from '@/composables/useToast';
import { nodeViewEventBus } from '@/event-bus';
@@ -224,8 +222,8 @@ export default defineComponent({
currentUser(): IUser | null {
return this.usersStore.currentUser;
},
workflowPermissions(): PermissionsMap<WorkflowScope> {
return getWorkflowPermissions(this.workflow);
workflowPermissions() {
return getResourcePermissions(this.workflow?.scopes).workflow;
},
workflowOwnerName(): string {
return this.workflowsEEStore.getWorkflowOwnerName(`${this.workflow.id}`);