Check `allow_organization_creation` feature flag on a few more views
What does this MR do and why?
Related to #452518 (closed)
The grouptenant scale team is starting to build out an Organization MVC. For more information about what an "Organization" will be see https://docs.gitlab.com/ee/architecture/blueprints/organization/
In !147930 (merged) we introduced a new allow_organization_creation
to control who can create an organization for the MVC. There were a few places that needed to be updated for full parity. This MR updates following logic when feature flag is disabled:
- Hide
New organization
button in empty state - 404
/-/organizations/new
- Hide
New organization
button in admin area (/admin/organizations
)
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.
Screenshots or screen recordings
With allow_organization_creation
feature flag disabled
Your work -> Organizations
Before | After |
---|---|
Admin area -> Organizations
Before | After |
---|---|
How to set up and validate locally
- Enable
ui_for_organizations
feature flagecho "Feature.enable(:ui_for_organizations)" | gdk rails c
- Change app/assets/javascripts/organizations/shared/components/organizations_view.vue#L35 to
return [];
to force empty state - Navigate to
/admin/organizations
-
New organization
buttons should not be shown
-
- Navigate to
/-/organizations
-
New organization
buttons should not be shown
-
- Navigate to
/-/organizations/new
- You should get a 404
- Enable
allow_organization_creation
feature flag and go through steps 3 - 5 again. It should now be possible to create an organization.echo "Feature.enable(:allow_organization_creation)" | gdk rails c
Edited by Peter Hegman