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>
This commit is contained in:
Csaba Tuncsik
2024-05-17 10:53:15 +02:00
committed by GitHub
parent b1f977ebd0
commit 596c472ecc
292 changed files with 14129 additions and 3989 deletions

View File

@@ -55,6 +55,7 @@ import type { PartialBy, TupleToUnion } from '@/utils/typeHelpers';
import type { Component } from 'vue';
import type { Scope } from '@n8n/permissions';
import type { NotificationOptions as ElementNotificationOptions } from 'element-plus';
import type { ProjectSharingData } from '@/features/projects/projects.types';
import type { Connection } from '@jsplumb/core';
export * from 'n8n-design-system/types';
@@ -301,8 +302,9 @@ export interface IWorkflowDb {
settings?: IWorkflowSettings;
tags?: ITag[] | string[]; // string[] when store or requested, ITag[] from API response
pinData?: IPinData;
sharedWith?: Array<Partial<IUser>>;
ownedBy?: Partial<IUser>;
sharedWithProjects?: ProjectSharingData[];
homeProject?: ProjectSharingData;
scopes?: Scope[];
versionId: string;
usedCredentials?: IUsedCredential[];
meta?: WorkflowMetadata;
@@ -322,8 +324,8 @@ export interface IWorkflowsShareResponse {
id: string;
createdAt: number | string;
updatedAt: number | string;
sharedWith?: Array<Partial<IUser>>;
ownedBy?: Partial<IUser>;
sharedWithProjects?: ProjectSharingData[];
homeProject?: ProjectSharingData;
}
// Identical or almost identical to cli.Interfaces.ts
@@ -347,9 +349,10 @@ export interface ICredentialsResponse extends ICredentialsEncrypted {
id: string;
createdAt: number | string;
updatedAt: number | string;
sharedWith?: Array<Partial<IUser>>;
ownedBy?: Partial<IUser>;
sharedWithProjects?: ProjectSharingData[];
homeProject?: ProjectSharingData;
currentUserHasAccess?: boolean;
scopes?: Scope[];
}
export interface ICredentialsBase {
@@ -1074,8 +1077,8 @@ export interface IUsedCredential {
name: string;
credentialType: string;
currentUserHasAccess: boolean;
ownedBy: Partial<IUser>;
sharedWith: Array<Partial<IUser>>;
homeProject?: ProjectSharingData;
sharedWithProjects?: ProjectSharingData[];
}
export interface WorkflowsState {
@@ -1831,7 +1834,8 @@ export type CloudUpdateLinkSourceType =
| 'variables'
| 'community-nodes'
| 'workflow-history'
| 'worker-view';
| 'worker-view'
| 'rbac';
export type UTMCampaign =
| 'upgrade-custom-data-filter'
@@ -1850,7 +1854,8 @@ export type UTMCampaign =
| 'upgrade-community-nodes'
| 'upgrade-workflow-history'
| 'upgrade-advanced-permissions'
| 'upgrade-worker-view';
| 'upgrade-worker-view'
| 'upgrade-rbac';
export type N8nBanners = {
[key in BannerName]: {