diff options
author | George Tsiolis <tsiolis.g@gmail.com> | 2018-02-06 14:17:23 +0200 |
---|---|---|
committer | George Tsiolis <tsiolis.g@gmail.com> | 2018-02-06 14:28:14 +0200 |
commit | 8114a2a8f419cb6976adbd54b67232bb1d60e415 (patch) | |
tree | 265ea263e02c53da59c85ff413f2c4b0685ff241 /app | |
parent | bfb32b46327576f5b5d4ff3d42198ba4601f1830 (diff) | |
download | gitlab-ce-8114a2a8f419cb6976adbd54b67232bb1d60e415.tar.gz |
Override group sidebar links
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/groups_helper.rb | 4 | ||||
-rw-r--r-- | app/views/layouts/nav/sidebar/_group.html.haml | 2 |
2 files changed, 5 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') |