mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
feat(core): Add LDAP support (#3835)
This commit is contained in:
@@ -26,8 +26,6 @@ import type { N8nApp } from '@/UserManagement/Interfaces';
|
||||
import superagent from 'superagent';
|
||||
import request from 'supertest';
|
||||
import { URL } from 'url';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
|
||||
import config from '@/config';
|
||||
import * as Db from '@/Db';
|
||||
import { WorkflowEntity } from '@db/entities/WorkflowEntity';
|
||||
@@ -69,6 +67,10 @@ import type {
|
||||
import { licenseController } from '@/license/license.controller';
|
||||
import { eventBusRouter } from '@/eventbus/eventBusRoutes';
|
||||
|
||||
import { v4 as uuid } from 'uuid';
|
||||
import { handleLdapInit } from '../../../src/Ldap/helpers';
|
||||
import { ldapController } from '@/Ldap/routes/ldap.controller.ee';
|
||||
|
||||
const loadNodesAndCredentials: INodesAndCredentials = {
|
||||
loaded: { nodes: {}, credentials: {} },
|
||||
known: { nodes: {}, credentials: {} },
|
||||
@@ -130,6 +132,7 @@ export async function initTestServer({
|
||||
license: { controller: licenseController, path: 'license' },
|
||||
eventBus: { controller: eventBusRouter, path: 'eventbus' },
|
||||
publicApi: apiRouters,
|
||||
ldap: { controller: ldapController, path: 'ldap' },
|
||||
};
|
||||
|
||||
for (const group of routerEndpoints) {
|
||||
@@ -173,7 +176,15 @@ const classifyEndpointGroups = (endpointGroups: string[]) => {
|
||||
const routerEndpoints: string[] = [];
|
||||
const functionEndpoints: string[] = [];
|
||||
|
||||
const ROUTER_GROUP = ['credentials', 'nodes', 'workflows', 'publicApi', 'license', 'eventBus'];
|
||||
const ROUTER_GROUP = [
|
||||
'credentials',
|
||||
'nodes',
|
||||
'workflows',
|
||||
'publicApi',
|
||||
'ldap',
|
||||
'eventBus',
|
||||
'license',
|
||||
];
|
||||
|
||||
endpointGroups.forEach((group) =>
|
||||
(ROUTER_GROUP.includes(group) ? routerEndpoints : functionEndpoints).push(group),
|
||||
@@ -239,6 +250,13 @@ export async function initCredentialsTypes(): Promise<void> {
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize LDAP manager.
|
||||
*/
|
||||
export async function initLdapManager(): Promise<void> {
|
||||
await handleLdapInit();
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize node types.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user