Organization admin area sidebar menus and root controller

What does this MR do and why?

Follow-up to !225916 (merged), add sidebar menu items for organization admin area as well as a root controller to redirect a user to the correct dashboard. An organization owner is redirected to the organization dashboard and an instance admin/custom admin role users are redirected to the instance dashboard.

This feature is behind a feature flag added in the previous MR. This MR serves as a minimal framework to build new organization features or to migrate existing features from instance or group to organizations.

This MR looks large but there are lots of small changes to update spec path helpers. Separating into multiple MR would have left something untestable (sidebar present that leads to nowhere).

In a follow-up MR we will add content to the organization dashboard.

References

Organization Owner Access to Admin Area (#587370)

Screenshots or screen recordings

Before After

Instance admin view

Screenshot 2026-03-10 at 11.23.47 AM.png

Instance admin view

Screenshot 2026-03-10 at 11.15.42 AM.png

Screenshot 2026-03-10 at 11.16.00 AM.png

Organization owner view

Very minimal for now. Will subsequently add user management views + organization settings

Screenshot 2026-03-10 at 11.16.23 AM.png

How to set up and validate locally

  1. Enable Feature Flags. In Rails console (bundle exec rails c):

    Feature.enable(:org_admin_area)
    Feature.enable(:ui_for_organizations)
    Feature.enable(:organization_switcher)
    Feature.enable(:organization_scoped_paths)
  2. Create a New Organization

    org = Organizations::Organization.create!(name: 'Test Organization', path: 'test-org')
  3. Create or Find a User to Make Org Owner. Use existing or create new.

    Users::CreateService.new(User.first, { name: 'Org Owner', username: 'org_owner', email: 'org_owner@example.com', password: 'mysupersecretpassword!', organization_id: org.id, organization_access_level: :owner }).execute
  4. Sign in as the org owner user (not an instance admin)

  5. You should see the Admin button in the top right. Click the button and it should take you to the blank Organization Admin page.

  6. Sign in as instance admin

  7. Click the Admin button in the top right and observe admin area is accessible as per normal. But you will also notice that a new menu item Organization overview is present.

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 Drew Blessing

Merge request reports

Loading