Skip to content

Remove default organization from current organization calculation

In lib/gitlab/current/organization.rb we default to the default organization.

      def organization
        from_params || from_user || ::Organizations::Organization.default_organization
      end

We will need to remove this for Cells 1.0.

In theory anonymous requests should be routed to the first cell holding the default organization - so the code may work. However we don't want to treat any cell as special as a matter of principle.

In this case, I think removal of the last condition may be required so that we have:

      def organization
        from_params || from_user
      end
Edited by Alex Pooley