Route new/create group through Organization scope
What does this MR do and why?
Scope new/create group by Organization.
- Adds Organization scoped routes for new and create group
- Ensures relevant global routes are made Organization Context aware
There is a more detailed description of Organization paths in the Organization Path Scope ADR.
This work sits behind a feature flag through Organization#scoped_paths?.
Relates to #553914 (closed)
References
- Organization path scope - https://handbook.gitlab.com/handbook/engineering/architecture/design-documents/organization/decisions/004_path_scope/
- Organization context resolution - https://handbook.gitlab.com/handbook/engineering/architecture/design-documents/organization/decisions/001_organization_context_resolution/
- Current organization - https://handbook.gitlab.com/handbook/engineering/architecture/design-documents/organization/current_organization/
Related to !197425 (merged)
Screenshots or screen recordings
Below illustrates examples of the "New Group" link depending on the Current Organization context.
| Before (unscoped) | After (Organization scoped) |
|---|---|
![]() |
![]() |
![]() |
![]() |
How to set up and validate locally
- In rails console enable the feature flag
Feature.enable :allow_organization_creation
Feature.enable :organization_switching
Feature.enable :ui_for_organizations
Feature.enable :organization_scoped_paths
- Create an Organization through the
+sidebar button. - Navigate to Organization Groups & Projects
- Click the
New groupbutton and observe the URL is/o/Organization scoped. - Create a group and observe the group is successfully created and you're within your new Organization as represented by the Organization name at the top portion of the sidebar.
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 Alex Pooley





