summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Tsiolis <tsiolis.g@gmail.com>2018-02-06 14:17:23 +0200
committerGeorge Tsiolis <tsiolis.g@gmail.com>2018-02-06 14:28:14 +0200
commit8114a2a8f419cb6976adbd54b67232bb1d60e415 (patch)
tree265ea263e02c53da59c85ff413f2c4b0685ff241
parentbfb32b46327576f5b5d4ff3d42198ba4601f1830 (diff)
downloadgitlab-ce-8114a2a8f419cb6976adbd54b67232bb1d60e415.tar.gz
Override group sidebar links
-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 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