You need to sign in or sign up before continuing.
Hide organization switcher for users with one organization
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Background
Follow-up from https://gitlab.com/gitlab-com/gl-infra/tenant-scale/organizations/organizations-internal-feedback/-/issues/1#note_2711361120
Proposal
If a user has only one organization they should not see the organization switcher
Implementation guide
- Add a new method
has_multiple_organizations?
toUser
model. Something likeorganizations.limit(2).count > 1
might work. - Add
has_multiple_organizations: user.has_multiple_organizations?
to app/helpers/sidebars_helper.rb#L66. - In app/assets/javascripts/super_sidebar/components/super_topbar.vue#L57 check
this.sidebarData.has_multiple_organizations
Edited by 🤖 GitLab Bot 🤖