Legal pages feature and dorfteich.online texts #82
Labels
No Label
area:auth
area:docs
area:export
area:ops
area:storage
area:supply-chain
auth
backend
blocked
collab
deployment
docs
effort:L
effort:M
effort:S
frontend
plugins
qa
vs-nfd
vs-nfd:blocker
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: stwaidele/dorfteich#82
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
Every EU-hosted instance needs imprint and privacy pages; Dorfteich ships this as a feature (kickoff decision), and dorfteich.online uses the operator's standard texts.
Scope
Instance settings 'Legal': two Markdown fields (imprint, privacy policy) edited by Site Admins with preview; rendered at
/legal/imprintand/legal/privacy(public, no auth, server-rendered like #56); footer links on all views incl. public pages and auth screens; a privacy-policy template covering Dorfteich's actual processing (accounts, sessions, rate-limit IPs, mails, uploads — from security.md §Privacy) shipped as documented default text indocs/self-hosting/legal-template.md; the operator's real texts for dorfteich.online are applied at go-live (checklist item in #89, not in the repo).Acceptance criteria
Technical notes
Dependencies
Depends on #19, #56.
Size: ~1 day
Conventions: English code/comments, clear human-readable code, no hard-coded UI strings (ADR 0012, add
deanden), permission checks only via the shared guard (docs/architecture/permissions.md). Read the referenced ADRs before starting.Implemented in
fd2bdb3— pipeline fully green (8 contexts), verified live on Test (/api/v1/legal/privacyserves the localized notice document with footer links; JSON reportsconfigured:falseuntil texts are added).Settings: two new Markdown instance settings
legal.imprint/legal.privacyPolicyin the typed registry — they ride the existingPATCH /admin/settings(SiteAdminGuard) with no new write endpoint. A new “Legal pages” admin section edits both with a toggleable rendered preview that uses the same shared pipeline the server renders with (markdown → schema doc → escaped HTML, security.md §Content) — covered by an api test proving stored<script>/onerrormarkup survives only as inert escaped text.Public rendering:
/legal/imprintand/legal/privacyas SPA routes (no session) plus, like #56, self-contained server-rendered HTML documents under/api/v1/legal/:kind. The endpoints are@SetupExempt— legal information stays reachable even while the first-run wizard (#80/#81) is pending. Unknown kinds 404.Footer everywhere (AC): new
FooterinAppLayoutcovers every SPA view — editor, auth screens, and the #56 public page view. The server-rendered documents share a newpublic/html-shell.ts(extracted from #56’s inline shell) that adds the same links and now renders its chrome in the instance default locale (ADR 0012).Unconfigured ≠ missing (AC): pages render a localized notice for visitors, and Site Admins additionally get a warning banner linking to the settings — asserted in e2e for both audiences.
Template (AC):
docs/self-hosting/legal-template.mdships imprint + privacy-policy templates in de and en whose sections mirror the implemented processing activities, with a review checklist table (accounts, sessions, rate-limit IPs, proxy logs, transactional mail, content/uploads, data export #68, deletion/pseudonymization #59, no third-party requests) anchored to security.md §Privacy. dorfteich.online’s real texts remain a #89 go-live item.Tests:
legal.e2e.db.test.ts(4) + new CI legal packlegal.spec.ts(4: footer navigation from the login screen, visitor notice, admin banner, and the admin form previewing + publishing a text end to end); the reshaped #56 shell is regression-covered by the existing public suites.