Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Account Removal #578

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Conversation

AaronJackson
Copy link
Member

@dpslwk nowhere near finished yet, mostly wanting to know whether this approach is ok. basically added an interface called EntityObfuscatableInterface for the function obfuscate. Thought about traits and attribute annotations but not sure if that's a better approach.

in terms of obfuscation so far, if a user performs an account removal:

  • remove all roles regardless of whether retain is set.
  • clear non-required fields from User (we need to retain name and address for 10 years) - so just the email address at the moment, and unlink it from Account
  • clear non-required fields from Profile

for bank transactions, we need to keep those for seven years but I dont see any harm in keeping them longer. I started looking into finding historic transactions which are no longer linked to users - we can keep the amount and linked account, but just erase the description (after 7 years). probably best to have a separate job to go through this view:

CREATE VIEW `vw_historic_unlinked_transactions` AS
SELECT bt.* FROM bank_transactions bt
JOIN accounts a ON bt.account_id = a.id
WHERE a.id NOT IN (
   SELECT DISTINCT(user.account_id) FROM user WHERE user.account_id IS NOT NULL
)
AND bt.transaction_date < DATE_SUB(NOW(),INTERVAL 7 YEAR);

for snackspace transactions, I don't think we need to do anything, but we might to unlink them from a User after they request removal, retaining the actual transactions for statistics.

similar for door logs, unless we decide it would be best to unlink these after 3 years regardless of account deletion.

cheers

@AaronJackson AaronJackson changed the title Account Removal [WIP] Account Removal Aug 20, 2023
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.

1 participant