feat: move sso and ldap logins into plugins (C2)

This commit is contained in:
LukeGus committed 2026-09-24 18:23:20 -05:00
1 parent 5c18435105
commit 925da4a661
223 files changed
+25778 -6820

No files matched your search

+3 -3
View File
@@ -22,7 +22,7 @@ import {
createCurrentUserRepository,
} from "../database/repositories/factory.js";
import type { UserRecord } from "../database/repositories/user-repository.js";
import { isOIDCUserAllowed } from "../database/routes/user-oidc-utils.js";
import { isExternalUserAllowed } from "./allowed-users.js";
import { LoginMethodError, type VerifiedIdentity } from "./types.js";
type ExternalIdentity = Extract<VerifiedIdentity, { kind: "external" }>;
@@ -64,9 +64,9 @@ function isAllowed(identity: ExternalIdentity): boolean {
if (!identity.allowedUsers) return true;
const email = identity.email ?? undefined;
return (
isOIDCUserAllowed(identity.allowedUsers, identity.subject, email) ||
isExternalUserAllowed(identity.allowedUsers, identity.subject, email) ||
(!!identity.legacyIdentifier &&
isOIDCUserAllowed(
isExternalUserAllowed(
identity.allowedUsers,
identity.legacyIdentifier,
email,