backend: Disallow immediate deletion behind :disallow_immediate_deletion FF
What does this MR do and why?
This change introduces a new safety feature that prevents users from immediately deleting projects and groups. Previously, users could bypass the normal deletion process (which includes a waiting period) and delete items right away. Now, there's a new feature flag called disallow_immediate_deletion
that, when enabled, blocks this immediate deletion capability.
The changes affect both the user interface and the backend systems:
- In the web interface, the "delete immediately" buttons and options are hidden when the feature flag is active
- In the API, requests to immediately delete projects or groups will return an error message explaining the feature is no longer available
- The backend controllers now check for this feature flag and deny access to immediate deletion when it's enabled
The feature flag is currently disabled by default, meaning the immediate deletion functionality still works as before. However, administrators can enable this flag to enforce a safer deletion process that requires users to wait through the standard deletion period rather than allowing instant removal of projects and groups.
This is a risk-reduction measure, likely implemented to prevent accidental or hasty deletions of important projects and groups by requiring users to go through the standard deletion workflow with its built-in waiting period.
Related work:
- Frontend MR: frontend: Disallow immediate deletion behind :d... (!202040 - merged) • Rémy Coutable, Peter Hegman • 18.4
- Documentation MR: doc: Disallow immediate deletion behind :disall... (!202045 - merged) • Rémy Coutable • 18.4
References
- Related to #561680+s
Screenshots or screen recordings
Resource | Before | After |
---|---|---|
Group settings | ![]() |
![]() |
Project settings | ![]() |
![]() |
How to set up and validate locally
- Enable the
disallow_immediate_deletion
feature flag. - Visit a group Settings page
- Visit a project Settings page
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.