[#5052] Allow users to request account closure #7874
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.
Relevant issue(s)
Fixes #5052
What does this do?
Adds a "Close account" link to the users profile, which when clicked takes the user to a confirmation screen explaining what happens when an account is closed. If they confirm then an account closure request is created and a confirmation email is sent to the user.
There is then a list of account closure requests in the admin which an admin can go through. That list has a link to the user's account, and a close button, which closes the account directly.
Why was this needed?
Implementation notes
Users::CloseAccountController
withnew
andcreate
actions for users to request account closure.AccountClosureRequest
model to manage closure requests.Video
Screen.Recording.2023-08-29.at.08.29.24-silent.mov
Notes to reviewer