Skip to content

Check Allow immediate deletion admin setting in group/project listing pages

Depends on Add the allow_immediate_namespaces_deletion app... (!205554 - merged). Related to #456679 (closed)

What does this MR do and why?

In !205556 (merged) we are adding a Allow immediate deletion admin setting. When this setting is false regular users cannot immediately delete groups or projects. This MR also changes the delete label in the Inactive tab to Delete immediately on project lists. This was already done on group lists.

For some history, we were originally going to do this functionality with the disallow_immediate_deletion feature flag but have pivoted to this admin setting. The admin setting defaults to true and the disallow_immediate_deletion feature flag is disabled so we can switch without issues.

The feature is behind by the allow_immediate_namespaces_deletion feature flag. Documentation has been updated to explain the new setting, and tests have been added to verify the functionality works correctly.

References

Screenshots or screen recordings

Page FF disabled FF enabled, and setting enabled FF enabled, and setting disabled
Groups list as admin ff-disabled-groups-as-admin Same as FF disabled Same as FF disabled
Groups list as owner ff-disabled-groups-as-owner Same as FF disabled ff-enabled-groups-as-owner
Projects list as admin ff-disabled-projects-as-admin Same as FF disabled Same as FF disabled
Projects list as owner ff-disabled-projects-as-owner Same as FF disabled ff-enabled-projects-as-owner

How to set up and validate locally

With the allow_immediate_namespaces_deletion FF disabled

  1. Go to /dashboard/projects and/or /dashboard/groups
  2. Mark a group or project for deletion
  3. Immediate deletion should be available in the Inactive tab

With the allow_immediate_namespaces_deletion FF enabled

  1. Go to /rails/features and enable allow_immediate_namespaces_deletion FF

With the allow_immediate_namespaces_deletion setting enabled

  1. Go to /dashboard/projects and/or /dashboard/groups
  2. Mark a group or project for deletion
  3. Immediate deletion should be available in the Inactive tab

With the allow_immediate_namespaces_deletion setting disabled

  1. Open the rails console with bin/rails console
  2. Run ApplicationSetting.first.update!(allow_immediate_namespaces_deletion: false)
  3. Go to /dashboard/projects and/or /dashboard/groups
  4. Mark a group or project for deletion
  5. Immediate deletion should not be available in the Inactive tab

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.

Edited by Peter Hegman

Merge request reports

Loading