Skip to content

feat: PII export, deletion workflow and audit trail#354

Open
Moyuchiiii wants to merge 2 commits intorohitdash08:mainfrom
Moyuchiiii:fix/bounty-issue-76
Open

feat: PII export, deletion workflow and audit trail#354
Moyuchiiii wants to merge 2 commits intorohitdash08:mainfrom
Moyuchiiii:fix/bounty-issue-76

Conversation

@Moyuchiiii
Copy link

Summary

Fixes #76

Adds privacy/GDPR endpoints under /privacy:

  • GET /export - Export all user PII as JSON
  • POST /delete-request - Initiate 30-day grace period deletion
  • POST /delete-cancel - Cancel pending deletion
  • POST /delete-confirm - Permanently delete all user data
  • GET /deletion-status - Check deletion status
  • GET /audit-log - View audit trail

Extended AuditLog model with ip_address, user_agent, detail fields.
Added deletion_requested_at and deletion_scheduled_for to User model.
Audit logs are preserved after user deletion (user_id nullified) for compliance.

Includes 8 test cases and schema migration support.


Auto-generated by bounty-hunter

@Moyuchiiii Moyuchiiii marked this pull request as ready for review March 10, 2026 07:41
@Moyuchiiii Moyuchiiii requested a review from rohitdash08 as a code owner March 10, 2026 07:41
@Moyuchiiii
Copy link
Author

Hi @rohitdash08! Just following up — would appreciate it if you could take a look when you get a chance. Let me know if anything needs to be adjusted. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PII Export & Delete Workflow (GDPR-ready)

1 participant