Allow switching of organizations
We need to allow users to switch organizations and then keep track of which organization the user is active in. See #417778 (closed) for switcher designs.
Engineering guide
- Add
current_organization_nameandcurrent_organization_idtolib/gitlab/gon_helper.rb - Using Disclosure create a Vue component that renders the available organizations and current organization in
app/assets/javascripts/super_sidebar/components. - Check feature flag and render component in app/assets/javascripts/super_sidebar/components/user_bar.vue#L151
- Use app/assets/javascripts/organizations/index/graphql/organizations.query.graphql to get available organizations when disclosure is opened.
- Current organization will be a link to that organization
- Switching organizations will be a link to the current page but in the context of that organization. For example,
/dashboard/groupsfor organizationFoo barwould be/-/organizations/foo-bar/dashboard/groups
Edited by Peter Hegman