Files
EpicNext-Cms/src/features/housekeeping/foundation/preview-gate.ts
T
Simo 9af1e62655
CI / check (push) Successful in 29s
CI / deploy (push) Successful in 56s
CI / release (push) Skipped
feat: allow rank-gated housekeeping preview in production
2026-08-31 20:29:38 +02:00

11 lines
270 B
TypeScript

export function isHousekeepingPreviewEnabled(input: {
nodeEnv: "development" | "test" | "production";
flag: boolean;
hasProductionAccess?: boolean;
}): boolean {
return (
input.flag &&
(input.nodeEnv !== "production" || input.hasProductionAccess === true)
);
}