Repository navigation
feat: mask personal data in staff views and audit every reveal - #319
Merged
Merged
Conversation
- Staff views mask phones (+20 10•• ••• 123) and emails (m•••@example.com) and withhold addresses (owner decision on admin#3).
- POST /admin/users/:id/reveal {field, reason} and POST /admin/restaurants/:id/reveal {reason} (support.read) return one value and record pii.reveal: who saw which field of whom, never the value.
- The owner's own restaurant view keeps its phone; exact search still matches the full value.
Co-authored-by: Yousef Ahmed Maher <ya1770620@gmail.com>
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.
Closes #317
What changes
Owner decision on Delivery-Plus0/delivery-plus-admin-app#3: staff see personal data masked by default, and every reveal is audited.
maskPhoneandmaskEmailin shared are the one format.+201012345123→+20 10•• ••• 123.mona.ali@example.com→m•••@example.com./api/admin/users): list, search and detail are masked. The address is withheld (hasAddressinstead)./api/admin/restaurants): rows and the staff application view mask the contact phone. The owner's own view keeps it.support.read), each recording onepii.revealaudit event (who saw which field of whom, never the value) before answering:POST /api/admin/users/:id/reveal{field: phone|email|address, reason};POST /api/admin/restaurants/:id/reveal{reason}.Acceptance criteria
support.read. Tested, with a check that the staged event doesn't contain the value. The contract lists both routes underpii.reveal.Checks
npm run verifypasses; OpenAPI generate and validate pass (29 admin paths).Generated by Claude Code