]> git.openstreetmap.org Git - rails.git/commit
Allow users to delete their own accounts
authorAndy Allan <git@gravitystorm.co.uk>
Thu, 9 Dec 2021 16:12:42 +0000 (16:12 +0000)
committerAndy Allan <git@gravitystorm.co.uk>
Wed, 9 Feb 2022 16:15:24 +0000 (16:15 +0000)
commit6c1d73a509a1ac2216a704f3dc5534d573e5d7ae
tree22de05674d168e3a2aad2d866f21864b7415a512
parentaf273f5d6ae160de0001ce1ac0c087d92a2463c6
Allow users to delete their own accounts

This PR allows users to delete their own accounts. The logic implemented matches
that currently used by the admins when they manually close accounts, although
there is room to be more complex in future e.g. completely removing accounts
with no content.

The error handling has been slightly adapted for namespaced controllers, by
anchoring the controller name with a leading forward slash.
app/abilities/ability.rb
app/controllers/account/deletions_controller.rb [new file with mode: 0644]
app/controllers/accounts_controller.rb
app/controllers/application_controller.rb
app/views/account/deletions/show.html.erb [new file with mode: 0644]
app/views/accounts/edit.html.erb
app/views/application/_settings_menu.html.erb
config/locales/en.yml
config/routes.rb
test/system/account_deletion_test.rb [new file with mode: 0644]