Skip to content

Prevent users from deleting their accounts on self-managed GitLab

Problem to solve

Under "User Settings"/"Account" a user has a button called "Delete account". We don't want out users to delete their accounts, either they are still employed here and then a new account will be created automatically (probably causing problems with permissions on projects being lost) or they have quit, then we will just block them automatically (and if they deleted themselves I would probably run the user creation script manually), to preserve stuff. In any case account deletion would only cause work and/or problems.

Target audience

Persona from https://design.gitlab.com/getting-started/personas : Sidney

Proposal

A simple configuration option set in gitlab.rb, in addition to a UI config here:

image

What does success look like, and how can we measure that?

When that configuration option is enabled, users should longer get such a button (or pressing it should have no effect/give an error message if someone thinks that gives a better UX).

Availability & Testing

Add feature level tests to ensure users are not able to delete their own account when the setting is enabled.

Edited by Sanad Liaquat