fix(editor): Connect up new project viewer role to the FE (#9913)
This commit is contained in:
23
packages/@n8n/permissions/src/constants.ts
Normal file
23
packages/@n8n/permissions/src/constants.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
export const DEFAULT_OPERATIONS = ['create', 'read', 'update', 'delete', 'list'] as const;
|
||||
export const RESOURCES = {
|
||||
auditLogs: ['manage'] as const,
|
||||
banner: ['dismiss'] as const,
|
||||
communityPackage: ['install', 'uninstall', 'update', 'list', 'manage'] as const,
|
||||
credential: ['share', 'move', ...DEFAULT_OPERATIONS] as const,
|
||||
externalSecretsProvider: ['sync', ...DEFAULT_OPERATIONS] as const,
|
||||
externalSecret: ['list', 'use'] as const,
|
||||
eventBusDestination: ['test', ...DEFAULT_OPERATIONS] as const,
|
||||
ldap: ['sync', 'manage'] as const,
|
||||
license: ['manage'] as const,
|
||||
logStreaming: ['manage'] as const,
|
||||
orchestration: ['read', 'list'] as const,
|
||||
project: [...DEFAULT_OPERATIONS] as const,
|
||||
saml: ['manage'] as const,
|
||||
securityAudit: ['generate'] as const,
|
||||
sourceControl: ['pull', 'push', 'manage'] as const,
|
||||
tag: [...DEFAULT_OPERATIONS] as const,
|
||||
user: ['resetPassword', 'changeRole', ...DEFAULT_OPERATIONS] as const,
|
||||
variable: [...DEFAULT_OPERATIONS] as const,
|
||||
workersView: ['manage'] as const,
|
||||
workflow: ['share', 'execute', 'move', ...DEFAULT_OPERATIONS] as const,
|
||||
} as const;
|
||||
@@ -1,3 +1,4 @@
|
||||
export type * from './types';
|
||||
export * from './constants';
|
||||
export * from './hasScope';
|
||||
export * from './combineScopes';
|
||||
|
||||
@@ -1,25 +1,7 @@
|
||||
export type DefaultOperations = 'create' | 'read' | 'update' | 'delete' | 'list';
|
||||
export type Resource =
|
||||
| 'auditLogs'
|
||||
| 'banner'
|
||||
| 'communityPackage'
|
||||
| 'credential'
|
||||
| 'externalSecretsProvider'
|
||||
| 'externalSecret'
|
||||
| 'eventBusDestination'
|
||||
| 'ldap'
|
||||
| 'license'
|
||||
| 'logStreaming'
|
||||
| 'orchestration'
|
||||
| 'project'
|
||||
| 'saml'
|
||||
| 'securityAudit'
|
||||
| 'sourceControl'
|
||||
| 'tag'
|
||||
| 'user'
|
||||
| 'variable'
|
||||
| 'workersView'
|
||||
| 'workflow';
|
||||
import type { DEFAULT_OPERATIONS, RESOURCES } from './constants';
|
||||
|
||||
export type DefaultOperations = (typeof DEFAULT_OPERATIONS)[number];
|
||||
export type Resource = keyof typeof RESOURCES;
|
||||
|
||||
export type ResourceScope<
|
||||
R extends Resource,
|
||||
|
||||
Reference in New Issue
Block a user