refactor(core, editor): Remove legacy nodesAccess (no-changelog) (#9016)

This commit is contained in:
Iván Ovejero
2024-04-05 13:17:34 +02:00
committed by GitHub
parent ba986fb018
commit b8ab049932
39 changed files with 45 additions and 266 deletions

View File

@@ -93,18 +93,10 @@ export abstract class ICredentials {
data: string | undefined;
nodesAccess: ICredentialNodeAccess[];
constructor(
nodeCredentials: INodeCredentialsDetails,
type: string,
nodesAccess: ICredentialNodeAccess[],
data?: string,
) {
constructor(nodeCredentials: INodeCredentialsDetails, type: string, data?: string) {
this.id = nodeCredentials.id ?? undefined;
this.name = nodeCredentials.name;
this.type = type;
this.nodesAccess = nodesAccess;
this.data = data;
}
@@ -112,8 +104,6 @@ export abstract class ICredentials {
abstract getDataToSave(): ICredentialsEncrypted;
abstract hasNodeAccess(nodeType: string): boolean;
abstract setData(data: ICredentialDataDecryptedObject): void;
}
@@ -124,19 +114,10 @@ export interface IUser {
lastName: string;
}
// Defines which nodes are allowed to access the credentials and
// when that access got granted from which user
export interface ICredentialNodeAccess {
nodeType: string;
user?: string;
date?: Date;
}
export interface ICredentialsDecrypted {
id: string;
name: string;
type: string;
nodesAccess: ICredentialNodeAccess[];
data?: ICredentialDataDecryptedObject;
ownedBy?: IUser;
sharedWith?: IUser[];
@@ -146,7 +127,6 @@ export interface ICredentialsEncrypted {
id?: string;
name: string;
type: string;
nodesAccess: ICredentialNodeAccess[];
data?: string;
}
@@ -345,7 +325,6 @@ export interface ICredentialData {
id?: string;
name: string;
data: string; // Contains the access data as encrypted JSON string
nodesAccess: ICredentialNodeAccess[];
}
// The encrypted credentials which the nodes can access