feat(editor): Replace middleware for Role checks with Scope checks (#7847)

This commit is contained in:
Alex Grozav
2023-11-29 10:35:40 +02:00
committed by GitHub
parent d4970410e1
commit 72852a60eb
18 changed files with 267 additions and 111 deletions

View File

@@ -1,6 +1,6 @@
import { defineStore } from 'pinia';
import { hasScope as genericHasScope } from '@n8n/permissions';
import type { HasScopeOptions, Scope, Resource } from '@n8n/permissions';
import type { ScopeOptions, Scope, Resource } from '@n8n/permissions';
import { ref } from 'vue';
import { STORES } from '@/constants';
import type { IRole } from '@/Interface';
@@ -80,7 +80,7 @@ export const useRBACStore = defineStore(STORES.RBAC, () => {
resourceId?: string;
projectId?: string;
},
options?: HasScopeOptions,
options?: ScopeOptions,
): boolean {
return genericHasScope(
scope,