feat: implement payroll PII masking, data privacy, and GDPR/CCPA consent engine (closes #1870) - #1889
Merged
Dev1822 merged 1 commit intoAug 28, 2026
Conversation
@Aakif-Kohari is attempting to deploy a commit to the Dev's projects Team on Vercel. A member of the Team first needs to authorize it. |
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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.
Description
This PR implements a Payroll PII Masking, Data Privacy & GDPR/CCPA Consent Engine. It introduces schemas for privacy consents, field-level masking rules, data erasure requests, and immutable PII access audit logs. The engine dynamically masks outgoing payroll data (e.g., SSNs, bank accounts) based on the requesting user's RBAC permissions. A "Data Erasure Guardrail" safely anonymizes a terminated employee's PII across historical ledgers while preserving the immutable financial/tax aggregation data required by the IRS 7-year retention mandate. The frontend allows Compliance Admins to configure masking rules, process GDPR erasure requests, and audit PII access.
Fixes#1870
Type of change
Changes Made
backend/src/models/dataPrivacy.model.js(New): Schemas forPrivacyConsent,PIIMaskingRule,DataErasureRequest, andDataAuditLog.backend/src/utils/piiMaskingEngine.utils.js(New): Engine for dynamic RBAC masking and safe GDPR erasure logic.backend/src/controllers/dataPrivacy.controller.js(New): Endpoints for masking rules, consent tracking, and erasure processing.backend/src/routes/dataPrivacy.routes.js(New): Route definitions.frontend/src/pages/DataPrivacyDashboard.jsx(New): UI to manage masking rules, process erasure requests, and view audit logs.How Has This Been Tested?
Checklist: