Update admin deletion protection settings
What does this MR do and why?
Updates the admin delayed deletion settings as described in #352960 (closed), the following changes are made:
- Updates Admin Area > General > Visibility and access controls settings for deletion protection.
- Adds a setting to enable delayed group deletion.
- Project deletion can only be enabled with group deletion.
- Delay period must now be
>=1
instead of>=0
. - Disable the delayed deletion inputs when "None, delete immediately" is selected.
- Refactors the settings to Vue because we need to use JavaScript to disable the inputs.
- Removes the sync where
delayed_group_deletion
was set todeletion_adjourned_period > 0
in !84694 (diffs). -
Locks & disables group-level setting for delayed project deletion when "None, delete immediately" is selected.
- Currently this setting is available even when an administrator disabled delayed deletion (by setting adjourned period to
0
) which meant that even if a group owner enabled delayed project deletion it wouldn't actually be enabled and projects would delete immediately.🙃
- Currently this setting is available even when an administrator disabled delayed deletion (by setting adjourned period to
Screenshots or screen recordings
Admin settings > Visibility and access controls
Before | After (Disabled) | After (Enabled) |
---|---|---|
Group settings > Permissions and group features
Before | After (Disabled) | After (Enabled) |
---|---|---|
How to set up and validate locally
- Checkout this MR's branch.
- View the Deletion protection settings at
[GDK_HOST]/admin/application_settings/general#js-visibility-settings
. - Validate that the retention period cannot be set to less than
1
. - Pick one of the following options:
- None, delete immediately.
- Keep deleted groups only for X days.
- Keep deleted groups and projects for X days.
- View the Group > Settings > Advanced > Remove group section to verify that delayed deletion is enabled/disabled.
- View the Group > Settings > Permissions and group features
Enable delayed project deletion
setting and verify that the setting is disabled & locked when "None, delete immediately" is selected, or that it is unlocked when "Keep deleted " was selected. - View the Project > Settings > Advanced > Remove project section to verify that delayed deletion is enabled/disabled.
- Repeat steps 5, 6 and 7 for each option in 4.
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.
Approvals required
Edited by Jiaan Louw