Skip to content

Organization groups - trying to delete a top level paid group fails

Summary

In the organization groups view (https://gitlab.com/-/organizations/default/groups_and_projects) you get an error if you try to delete a top level group that is paid. This is because top level paid groups cannot be deleted. This is the alert you see in the group settings page.

Screenshot_2024-05-13_at_4.49.31_PM

Steps to reproduce

  1. Simulate SaaS instance and assign an Ultimate license to a group - https://docs.gitlab.com/ee/development/ee_features.html#simulate-a-saas-instance
  2. Go to /-/organizations/default/groups_and_projects and try to delete the group you just gave an Ultimate license to

What is the current bug behavior?

An error is displayed

What is the expected correct behavior?

A message explaining why the group can't be deleted should be shown

Relevant logs and/or screenshots

Screen_Recording_2024-05-13_at_4.33.53_PM

Implementation plan

  1. Expose group.paid? to the CE group_type.rb
  2. Expose new property in the GraphQL query on the frontend for organization groups
  3. Move group_list_item_deletion_disabled_modal.vue to CE
    • This component is very vague currently, we can move the body of the modal into a prop or a slot to allow us to pass information why deletion is disabled.
    • In this case, something like "This group is currently tied to a paid subscription"
  4. Expose the newly moved to CE group_list_item_deletion_disabled_modal.vue in the CE group_list_item_delete_modal.vue
Edited by Zack Cuddy