Use the config not the env var

This commit is contained in:
Owen
2026-06-22 10:24:16 -04:00
parent 3b68139873
commit d7cfffd92d
7 changed files with 43 additions and 14 deletions

View File

@@ -38,6 +38,7 @@ import {
} from "@server/lib/validators";
import logger from "@server/logger";
import { OpenAPITags, registry } from "@server/openApi";
import privateConfig from "@server/private/lib/config";
import HttpCode from "@server/types/HttpCode";
import { and, eq, inArray, type InferInsertModel } from "drizzle-orm";
import { NextFunction, Request, Response } from "express";
@@ -219,7 +220,10 @@ export async function createResourcePolicy(
);
}
if (process.env.IDENTITY_PROVIDER_MODE === "org") {
if (
privateConfig.getRawPrivateConfig().app
.identity_provider_mode === "org"
) {
const [providerOrg] = await db
.select()
.from(idpOrg)