mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
feat(core): Improve ldap/saml toggle and tests (#5771)
* improve ldap/saml toggle and tests * import cleanup * reject regular login users when saml is enabled * lint fix
This commit is contained in:
committed by
GitHub
parent
30aeeb70b4
commit
47ee357059
@@ -78,6 +78,9 @@ import { LdapManager } from '@/Ldap/LdapManager.ee';
|
||||
import { LDAP_ENABLED } from '@/Ldap/constants';
|
||||
import { handleLdapInit } from '@/Ldap/helpers';
|
||||
import { Push } from '@/push';
|
||||
import { setSamlLoginEnabled } from '@/sso/saml/samlHelpers';
|
||||
import { SamlService } from '@/sso/saml/saml.service.ee';
|
||||
import { SamlController } from '@/sso/saml/routes/saml.controller.ee';
|
||||
|
||||
export const mockInstance = <T>(
|
||||
ctor: new (...args: any[]) => T,
|
||||
@@ -190,6 +193,11 @@ export async function initTestServer({
|
||||
new LdapController(service, sync, internalHooks),
|
||||
);
|
||||
break;
|
||||
case 'saml':
|
||||
await setSamlLoginEnabled(true);
|
||||
const samlService = Container.get(SamlService);
|
||||
registerController(testServer.app, config, new SamlController(samlService));
|
||||
break;
|
||||
case 'nodes':
|
||||
registerController(
|
||||
testServer.app,
|
||||
|
||||
Reference in New Issue
Block a user