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](/uploads/51d258c903bc84cd929d6ca50c883e79/image.png) ### 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 <!-- This section needs to be retained and filled in during the workflow planning breakdown phase of this feature proposal, if not earlier. What risks does this change pose to our availability? How might it affect the quality of the product? What additional test coverage or changes to tests will be needed? Will it require cross-browser testing? Please list the test areas (unit, integration and end-to-end) that needs to be added or updated to ensure that this feature will work as intended. Please use the list below as guidance. * Unit test changes * Integration test changes * End-to-end test change See the Quality Engineering quad planning and test planning processes and reach out to your counterpart Software Engineer in Test for assistance. Quad Planning: https://about.gitlab.com/handbook/engineering/quality/quality-engineering/quad-planning Test Planning: https://about.gitlab.com/handbook/engineering/quality/quality-engineering/test-engineering/#test-planning --> Add feature level tests to ensure users are not able to delete their own account when the setting is enabled.
issue