[openstreetmap/openstreetmap-website] Make account deletion remove the email address when possible (PR #3488)
Tom Hughes
notifications at github.com
Thu Mar 3 19:07:57 UTC 2022
This is a first draft for extending the new account deletion logic to remove the email address when the user has no edits.
As suggested to me by @simonpoole it doesn't attempt to offer the user a choice and instead just always removes the email when the user has no edits.
There is one tricky issue which is that changing `remove_personal_data` revealed that the use of `soft_destroy` by the user factory is problematic as it assumes that the user ID is set and uses it to set the display name (and now email) but when a user is created via a factory the user will not have been saved and won't have an ID yet.
Currently I've changed the factory to use `hide` instead which only sets the status but that's possibly not ideal.
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/openstreetmap-website/pull/3488
-- Commit Summary --
* Make account deletion remove the email address when possible
-- File Changes --
M app/models/user.rb (1)
M app/views/account/deletions/show.html.erb (5)
M config/locales/en.yml (1)
M test/factories/user.rb (2)
M test/system/account_deletion_test.rb (18)
-- Patch Links --
https://github.com/openstreetmap/openstreetmap-website/pull/3488.patch
https://github.com/openstreetmap/openstreetmap-website/pull/3488.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/3488
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/3488 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20220303/e32457d5/attachment.htm>
More information about the rails-dev
mailing list