Add admin note when a user deletes their own account
What does this MR do and why?
Resolves https://gitlab.com/gitlab-org/modelops/anti-abuse/team-tasks/-/issues/367
When delay_delete_own_user
feature flag is enabled and a user deletes their own account, an admin note is added for the user indicating that they requested to delete their own account and when. This aims to help Support and Trust & Safety teams in reviewing requests for immediate account deletion ensuring a user does not have a bannable offense before their account is deleted.
Screenshots or screen recordings
Screen_Recording_2023-05-16_at_1.35.52_PM
How to set up and validate locally
- Enable
delay_delete_own_user
feature flag$ rails console > Feature.enable(:delay_delete_own_user)
- Login using a user to delete
- Go to http://localhost:3000/-/profile/account and delete the logged in user's own account
- Login an admin user and go to http://localhost:3000/admin/users?filter=blocked and click on the deleted user's row on the table. This should take you the deleted user's user admin page
- Validate that an
Admin Note
is added to the user indicating that they deleted their own account on a specific timestamp
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Eugie Limpin