All checks were successful
CI / Lint, typecheck, test (push) Successful in 3m7s
CI / Build container images (push) Has been skipped
CD / Build and push images (push) Successful in 3m14s
CD / Deploy to Test (push) Successful in 12s
CD / Smoke tests against Test (push) Successful in 1m16s
CD / Promote to Int (push) Successful in 9s
CI / Auth e2e pack (push) Successful in 5m9s
CI / Import/export fidelity gate (push) Successful in 45s
Imprint and privacy policy are two new Markdown instance settings (legal.imprint, legal.privacyPolicy), edited by Site Admins in a new "Legal pages" admin section with a toggleable rendered preview. The preview uses the same shared pipeline the server renders with (markdown → schema doc → escaped HTML), so stored markup can never smuggle script to visitors. The pages render publicly at /legal/imprint and /legal/privacy — as an SPA route plus, like #56, a self-contained server-rendered HTML document under /api/v1/legal/:kind. The endpoints are setup-exempt: legal information stays reachable even while the first-run wizard is pending. Unconfigured pages show a localized notice instead of 404ing, and Site Admins additionally get a warning banner linking to the settings. A new footer with both links appears on every SPA view (editor, auth screens, public pages) and in the server-rendered documents, whose shared shell moved to public/html-shell.ts and now renders its chrome in the instance default locale (ADR 0012). docs/self-hosting/legal-template.md ships imprint and privacy-policy templates in English and German whose sections mirror Dorfteich's actual processing activities (accounts, sessions, rate-limit IPs, proxy logs, transactional mail, content, export, deletion, no third-party requests), with a review checklist tied to security.md §Privacy. New `legal` i18n namespace (de+en); api and web e2e coverage including a new CI legal pack (footer navigation, notice vs. admin banner, and the admin form publishing a text end to end). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EwZ4jR4KFAPvpjWevfUGX1
23 lines
835 B
TypeScript
23 lines
835 B
TypeScript
/**
|
|
* Instance legal pages (issue #82, security.md §Privacy): imprint and
|
|
* privacy policy are instance settings holding Markdown, edited by Site
|
|
* Admins and rendered publicly at /legal/<kind> — a core feature for
|
|
* EU-hosted instances, not an afterthought.
|
|
*/
|
|
|
|
export const LEGAL_KINDS = ['imprint', 'privacy'] as const;
|
|
export type LegalKind = (typeof LEGAL_KINDS)[number];
|
|
|
|
export function isLegalKind(value: string): value is LegalKind {
|
|
return (LEGAL_KINDS as readonly string[]).includes(value);
|
|
}
|
|
|
|
/** What `GET /legal/:kind/content` returns; the SPA's legal page renders it. */
|
|
export interface LegalPageView {
|
|
kind: LegalKind;
|
|
/** False while the Site Admin has not provided a text yet. */
|
|
configured: boolean;
|
|
/** Server-rendered HTML from the stored Markdown; empty when unconfigured. */
|
|
html: string;
|
|
}
|