Skip to content

Update admin deletion protection settings

Jiaan Louw requested to merge 352960-update-admin-delayed-deletion-settings into master

What does this MR do and why?

Updates the admin delayed deletion settings as described in #352960 (closed), the following changes are made:

  1. 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.
  2. Removes the sync where delayed_group_deletion was set to deletion_adjourned_period > 0 in !84694 (diffs).
  3. 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. 🙃

Screenshots or screen recordings

Admin settings > Visibility and access controls

Before After (Disabled) After (Enabled)
image image image

Group settings > Permissions and group features

Before After (Disabled) After (Enabled)
image image image

How to set up and validate locally

  1. Checkout this MR's branch.
  2. View the Deletion protection settings at [GDK_HOST]/admin/application_settings/general#js-visibility-settings.
  3. Validate that the retention period cannot be set to less than 1.
  4. Pick one of the following options:
    • None, delete immediately.
    • Keep deleted groups only for X days.
    • Keep deleted groups and projects for X days.
  5. View the Group > Settings > Advanced > Remove group section to verify that delayed deletion is enabled/disabled.
  6. 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.
  7. View the Project > Settings > Advanced > Remove project section to verify that delayed deletion is enabled/disabled.
  8. 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.

Approvals required

  1. backend reviewer
  2. backend maintainer
  3. frontend reviewer
  4. frontend maintainer
  5. database reviewer
  6. database maintainer
  7. Technical Writing reviewer
  8. UX reviewer
Edited by Jiaan Louw

Merge request reports