n8n/packages/cli/src/permissions/project-roles.ts
Csaba Tuncsik 596c472ecc
feat: RBAC (#8922)
Signed-off-by: Oleg Ivaniv <me@olegivaniv.com>
Co-authored-by: Val <68596159+valya@users.noreply.github.com>
Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
Co-authored-by: Valya Bullions <valya@n8n.io>
Co-authored-by: Danny Martini <danny@n8n.io>
Co-authored-by: Danny Martini <despair.blue@gmail.com>
Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
Co-authored-by: Omar Ajoue <krynble@gmail.com>
Co-authored-by: oleg <me@olegivaniv.com>
Co-authored-by: Michael Kret <michael.k@radency.com>
Co-authored-by: Michael Kret <88898367+michael-radency@users.noreply.github.com>
Co-authored-by: Elias Meire <elias@meire.dev>
Co-authored-by: Giulio Andreini <andreini@netseven.it>
Co-authored-by: Giulio Andreini <g.andreini@gmail.com>
Co-authored-by: Ayato Hayashi <go12limchangyong@gmail.com>
2024-05-17 10:53:15 +02:00

60 lines
1.2 KiB
TypeScript

import type { Scope } from '@n8n/permissions';
/**
* Diff between admin in personal project and admin in other projects:
* - You cannot rename your personal project.
* - You cannot invite people to your personal project.
*/
export const REGULAR_PROJECT_ADMIN_SCOPES: Scope[] = [
'workflow:create',
'workflow:read',
'workflow:update',
'workflow:delete',
'workflow:list',
'workflow:execute',
'credential:create',
'credential:read',
'credential:update',
'credential:delete',
'credential:list',
'project:list',
'project:read',
'project:update',
'project:delete',
];
export const PERSONAL_PROJECT_OWNER_SCOPES: Scope[] = [
'workflow:create',
'workflow:read',
'workflow:update',
'workflow:delete',
'workflow:list',
'workflow:execute',
'workflow:share',
'credential:create',
'credential:read',
'credential:update',
'credential:delete',
'credential:list',
'credential:share',
'project:list',
'project:read',
];
export const PROJECT_EDITOR_SCOPES: Scope[] = [
'workflow:create',
'workflow:read',
'workflow:update',
'workflow:delete',
'workflow:list',
'workflow:execute',
'credential:create',
'credential:read',
'credential:update',
'credential:delete',
'credential:list',
'project:list',
'project:read',
];