Skip to content

feat: move privacy policy to the database with a superadmin editor - #49

Merged
swayam25 merged 2 commits into
mainfrom
feat/privacy-policy-db
Aug 15, 2026
Merged

feat: move privacy policy to the database with a superadmin editor#49
swayam25 merged 2 commits into
mainfrom
feat/privacy-policy-db

Conversation

@swayam25

@swayam25 swayam25 commented Aug 15, 2026

Copy link
Copy Markdown
Member

Summary

  • /privacy now renders markdown stored in settings_table, same pattern as /rules, instead of a hardcoded sections array
  • New /admin/privacy editor, gated to superadmin (PUT /admin/privacy) since it's a legal statement about member data
  • Contact email lives in the policy content itself via a [email]: ... markdown reference, not hardcoded config
  • Rules/privacy markdown-to-cards parsing extracted into a shared markdown-sections.ts

…radmin editor

Adds a public GET /privacy and a superadmin-only PUT /admin/privacy, mirroring
the existing rules pattern but gated to root since it's a legal statement
about member data handling. The public /privacy page now renders markdown
from settings_table instead of a hardcoded sections array, and gets a new
/admin/privacy editor.

The contact email lives in the policy content itself via a `[email]: ...`
markdown reference definition rather than a hardcoded config value, so it can
be changed without a deploy. The rules/privacy markdown-to-cards parser is
extracted into a shared markdown-sections.ts so both pages stay in sync.
@swayam25 swayam25 changed the title Move privacy policy to the database with a superadmin editor feat: move privacy policy to the database with a superadmin editor Aug 15, 2026
@swayam25 swayam25 added the enhancement New feature or request label Aug 15, 2026
Neither the CI build check nor the prod Docker image build ever has a live
API to fetch from, so a bare throw in /privacy's load always failed the
build, not just a real outage. Match /rules: catch and fall back to an empty
policy instead.
@swayam25
swayam25 merged commit cd2e316 into main Aug 15, 2026
6 checks passed
@swayam25
swayam25 deleted the feat/privacy-policy-db branch August 15, 2026 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant