Skip to content

Exclude projects pending deletion from group visibility level validation

What does this MR do and why?

Fixes issue https://gitlab.com/gitlab-org/gitlab/-/issues/418870 where the visibility level of groups cannot be changed after a public project owned by the group is pending deletion.

How to set up and validate locally

  1. Create a new public group i.e. publicgroup
  2. Under the public group, create an empty private project i.e. publicgroup/privateproject
  3. Under the public group, create another empty project but with public visibility i.e. publicgroup/publicprojecttodelete
  4. Verify in the group settings that the visibility level cannot be changed from public
  5. Delete the public group made in step 3 (publicgroup/publicprojecttodelete)
  6. If delayed project retention is enabled, delete the group immediately by going back to the settings page and deleting it again (the group name will now have -deleted-XXXXX at the end of it)
  7. Verify in the group settings that the option to make the group private is available again

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports