FastAPI + Celery + Next.js + Postgres/Redis app with company monitoring, source collection, LLM-based change analysis, enrichment, and account security (Turnstile, escalating lockout, email verification).
14 lines
583 B
TypeScript
14 lines
583 B
TypeScript
import type { SystemStatus } from "./types";
|
|
|
|
/**
|
|
* True when this connection is getting the local-dev free pass (fixed
|
|
* account, no login) - both that the operator hasn't forced full lockdown
|
|
* (`auth_mode === "jwt"`) and that the backend actually recognized this
|
|
* specific request as coming from loopback (`is_localhost`). Used anywhere
|
|
* the UI needs to decide whether to show a login screen, a sign-out
|
|
* button, or local-dev-only copy.
|
|
*/
|
|
export function isLocalConvenience(status: SystemStatus): boolean {
|
|
return status.auth_mode !== "jwt" && status.is_localhost;
|
|
}
|