mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
refactor(core): Use DI for LDAP code (no-changelog) (#8248)
Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
@@ -70,7 +70,7 @@ import { EventBusControllerEE } from '@/eventbus/eventBus.controller.ee';
|
||||
import { LicenseController } from '@/license/license.controller';
|
||||
import { setupPushServer, setupPushHandler } from '@/push';
|
||||
import { setupAuthMiddlewares } from './middlewares';
|
||||
import { handleLdapInit, isLdapEnabled } from './Ldap/helpers';
|
||||
import { isLdapEnabled } from './Ldap/helpers';
|
||||
import { AbstractServer } from './AbstractServer';
|
||||
import { PostHogClient } from './posthog';
|
||||
import { eventBus } from './eventbus';
|
||||
@@ -255,7 +255,9 @@ export class Server extends AbstractServer {
|
||||
}
|
||||
|
||||
if (isLdapEnabled()) {
|
||||
const { LdapController } = await require('@/controllers/ldap.controller');
|
||||
const { LdapService } = await import('@/Ldap/ldap.service');
|
||||
const { LdapController } = await require('@/Ldap/ldap.controller');
|
||||
await Container.get(LdapService).init();
|
||||
controllers.push(LdapController);
|
||||
}
|
||||
|
||||
@@ -351,8 +353,6 @@ export class Server extends AbstractServer {
|
||||
await Container.get(Queue).init();
|
||||
}
|
||||
|
||||
await handleLdapInit();
|
||||
|
||||
await handleMfaDisable();
|
||||
|
||||
await this.registerControllers(ignoredEndpoints);
|
||||
|
||||
Reference in New Issue
Block a user