Skip to content

Support organization_path for determining current organization

Rutger Wessels requested to merge 443829-organization-path into master

What does this MR do and why?

For cells, we need to set Current.organization. One of the ways of doing that is using the URL path. This works for groups. This MR adds support for organization_path: /organizations/<something>

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

Preparation: using gdk rails c:

  • enable feature flag Feature.enable(:ui_for_organizations)
  • Create a new organization: Organizations::Organization.create!(name: 'My new organization', path: 'my-new-org')
  • Modify app/views/organizations/organizations/show.html.haml: add = "Current Organization: #{Current.organization.name}" to this file

Now visit `http://gdk.test:3000/-/organizations/my-new-org. It should show "Current Organization: My new organization"

On master, it will be 'Default Organization

Related to #443829 (closed)

Merge request reports

Loading