Create internal API to delete top level groups in an organization
What does this MR do and why?
This is part of the ongoing Category:Organization work by grouptenant scale. Read the blueprint to understand more about it.
Currently, we cannot delete top-level groups through our REST API to prevent accidental removal of groups. Therefore, we're creating this internal API to delete top level groups in organizations.
All of these changes are behind the ui_for_organizations
feature flag.
This also does some refactor to move some common params to Groups::Params.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
How to set up and validate locally
Run the specs or you can use curl to test the new internal endpoint.
Related to #461663