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

have default and customizable anonymization definitions #3

Open
NeimadTL opened this issue Feb 7, 2021 · 0 comments
Open

have default and customizable anonymization definitions #3

NeimadTL opened this issue Feb 7, 2021 · 0 comments

Comments

@NeimadTL
Copy link

NeimadTL commented Feb 7, 2021

Since data anonymization is just a way to make data unrecognizable, we should introduce a way so the gem does it by default for a set of chosen attributes.

class User
  def anonymization_definitions
    [firstname, lastname, email] 
  end
end

user = User.new(firstname: 'John', lastname: 'Doe', email: '[email protected]')
user.save

John's has used the service for quite long time and was happy with it but for some reason, he no longer needs it. He decides to delete his account and therefore the service provider needs to anonymize its data.

user = User.find_by(email: '[email protected]')
user.anonymize
user.reload
=> #<User id:3, firstname: '3_anonymzed', lastname: '3_anonymized', email: '[email protected]'>

Customizable anonymzation values should still be allowed from the standpoint of the service providers. They may want to exposed those anonymized data to their customers in different way than <record.id>_anonymized

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

No branches or pull requests

1 participant