mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
refactor(core, editor): Remove legacy nodesAccess (no-changelog) (#9016)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -46,10 +46,6 @@ export interface INodeTypesObject {
|
||||
}
|
||||
|
||||
export class Credentials extends ICredentials {
|
||||
hasNodeAccess() {
|
||||
return true;
|
||||
}
|
||||
|
||||
setData(data: ICredentialDataDecryptedObject) {
|
||||
this.data = JSON.stringify(data);
|
||||
}
|
||||
@@ -71,7 +67,6 @@ export class Credentials extends ICredentials {
|
||||
name: this.name,
|
||||
type: this.type,
|
||||
data: this.data,
|
||||
nodesAccess: this.nodesAccess,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user