Remove the extended_organization_url_scoping feature flag

What does this MR do and why?

This MR removes the extended_organization_url_scoping feature flag. This was a gitlab_com_derisk flag added in !254952 (merged). It has been enabled for 100% of GitLab.com for over 24 hours, so we can clean it up now.

The flag controlled organization URL scoping (the /o/:organization_path/... routes) for module-level URL helpers, url_for/polymorphic_url, and the fallback that reads the organization from the X-GitLab-Organization-ID header on API requests. With the flag gone, this behavior is now always on.

  • app/helpers/routing/organizations_helper.rb: removed the separate "gated" override module. MappedHelpers.install now prepends one override module everywhere. The override method is a plain if/else again: if a scoped path exists, call the organization helper, otherwise call super. header_organization no longer checks the flag, and extended_scoping_enabled? is removed.
  • Removed the three "flag disabled" contexts from spec/helpers/routing/organizations_helper_spec.rb and deleted the flag YAML file.
  • Renamed spec/support/extended_organization_url_scoping.rb to spec/support/organization_url_header_fallback.rb. It now stubs MappedHelpers.header_organization to return nil for feature specs, instead of stubbing the flag. This keeps feature specs unscoped until #605262 is done. Reviewers should take a look at this part.

References

Screenshots or screen recordings

Not applicable, backend URL generation only.

How to set up and validate locally

  1. In a Rails console, create an organization with path my-org and move a group into it. You still need Feature.enable(:ui_for_organizations) for the organization UI.
  2. Call an API endpoint with the X-GitLab-Organization-ID header set to that organization's ID, for example curl -H "X-GitLab-Organization-ID: <id>" http://gdk.test:3000/api/v4/groups/<group-id>. Check that web_url values are nested under /o/my-org/.
  3. In a Rails console, inside an organization context, run Gitlab::Routing.url_helpers.projects_path and check it returns /o/my-org/projects. No feature flag needs to be enabled anymore.

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.

🤖 Generated with Claude Code

Merge request reports

Loading
Loading