feat: move privacy policy to the database with a superadmin editor - #49
Merged
Conversation
…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.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/privacynow renders markdown stored insettings_table, same pattern as/rules, instead of a hardcoded sections array/admin/privacyeditor, gated to superadmin (PUT /admin/privacy) since it's a legal statement about member data[email]: ...markdown reference, not hardcoded configmarkdown-sections.ts