diff options
-rw-r--r-- | app/helpers/groups_helper.rb | 4 | ||||
-rw-r--r-- | app/views/layouts/nav/sidebar/_group.html.haml | 2 | ||||
-rw-r--r-- | changelogs/unreleased/fix-show-sidebar-sub-level-items-for-billing.yml | 5 |
3 files changed, 10 insertions, 1 deletions
diff --git a/app/helpers/groups_helper.rb b/app/helpers/groups_helper.rb index 676c1d1988b..45e637b225b 100644 --- a/app/helpers/groups_helper.rb +++ b/app/helpers/groups_helper.rb @@ -1,4 +1,8 @@ module GroupsHelper + def group_nav_link_paths + %w[groups#projects groups#edit ci_cd#show ldap_group_links#index hooks#index audit_events#index pipeline_quota#index] + end + def can_change_group_visibility_level?(group) can?(current_user, :change_visibility_level, group) end diff --git a/app/views/layouts/nav/sidebar/_group.html.haml b/app/views/layouts/nav/sidebar/_group.html.haml index 96aae06a9df..09a43a2cac5 100644 --- a/app/views/layouts/nav/sidebar/_group.html.haml +++ b/app/views/layouts/nav/sidebar/_group.html.haml @@ -88,7 +88,7 @@ %strong.fly-out-top-item-name #{ _('Members') } - if current_user && can?(current_user, :admin_group, @group) - = nav_link(path: %w[groups#projects groups#edit ci_cd#show]) do + = nav_link(path: group_nav_link_paths) do = link_to edit_group_path(@group) do .nav-icon-container = sprite_icon('settings') diff --git a/changelogs/unreleased/fix-show-sidebar-sub-level-items-for-billing.yml b/changelogs/unreleased/fix-show-sidebar-sub-level-items-for-billing.yml new file mode 100644 index 00000000000..883eecabe04 --- /dev/null +++ b/changelogs/unreleased/fix-show-sidebar-sub-level-items-for-billing.yml @@ -0,0 +1,5 @@ +--- +title: Override group sidebar links +merge_request: 16942 +author: George Tsiolis +type: fixed |