When subgroup contains a project (and Only admins can delete project is enabled), do not show a non-admin owner of the project to remove the subgroup
Scenario: "Only admins can delete project" is turned on.
- There is a non-admin user who owns a sub-group
- The non-admin user has created a project in the sub-group
- The non-admin user is able to "remove group" and gets a message "Group subgroupxyz was scheduled for deletion"
- It is noted that neither the subgroup is deleted nor the project
Expected behavior: If the project deletion protection is turned on, even if a non-admin user is a subgroup owner and the subgroup contains a project, they should not have the option to "Remove group". OR Modify the message "Group subgroupxyz was scheduled for deletion" to "Group subgroupxyz cannot be scheduled for deletion as it contains a project".
Confirm: The project in the subgroup is NOT deleted.
Proposal
If:
- Attempting to delete a group containing projects
- AND "only admins can delete project" is enabled on the instance
Then, we should reject the group deletion attempt with an error of "Group cannot be removed as it contains projects. An instance-level setting requires an admin to delete projects".
Issue readiness
-
Product: issue description is accurate with an acceptable proposal for an MVC -
Engineering: issue is implementable with few remaining questions, is sufficiently broken down, and is able to be estimated
Edited by Liam McAndrew