Skip to content

Add admin note when a user deletes their own account

Eugie Limpin requested to merge el-delete-own-user-admin-note into master

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

  1. Enable delay_delete_own_user feature flag
    $ rails console
    > Feature.enable(:delay_delete_own_user)
  2. Login using a user to delete
  3. Go to http://localhost:3000/-/profile/account and delete the logged in user's own account
  4. 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
  5. Validate that an Admin Note is added to the user indicating that they deleted their own account on a specific timestamp Screenshot_2023-05-16_at_1.42.17_PM

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Eugie Limpin

Merge request reports

Loading