summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2018-02-06 13:27:55 +0000
committerSean McGivern <sean@mcgivern.me.uk>2018-02-06 13:27:55 +0000
commitb9d547b12c3731160c456f3f20366e600ab99484 (patch)
treea80a008b07ebe49248519c4ead34aedc87f72631
parent41b5bb5748c3afc3bb58209aad42ccd1cb89a46c (diff)
parent8114a2a8f419cb6976adbd54b67232bb1d60e415 (diff)
downloadgitlab-ce-b9d547b12c3731160c456f3f20366e600ab99484.tar.gz
Merge branch 'fix/show-sidebar-sub-level-items-for-billing' into 'master'
Override group sidebar links See merge request gitlab-org/gitlab-ce!16942
-rw-r--r--app/helpers/groups_helper.rb4
-rw-r--r--app/views/layouts/nav/sidebar/_group.html.haml2
-rw-r--r--changelogs/unreleased/fix-show-sidebar-sub-level-items-for-billing.yml5
3 files changed, 10 insertions, 1 deletions
diff --git a/app/helpers/groups_helper.rb b/app/helpers/groups_helper.rb
index 09450eaa5b7..23de3590b93 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