diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-20 12:16:11 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-20 12:16:11 +0300 |
commit | edaa33dee2ff2f7ea3fac488d41558eb5f86d68c (patch) | |
tree | 11f143effbfeba52329fb7afbd05e6e2a3790241 /lib/sidebars/projects/menus/issues_menu.rb | |
parent | d8a5691316400a0f7ec4f83832698f1988eb27c1 (diff) |
Add latest changes from gitlab-org/gitlab@14-7-stable-eev14.7.0-rc42
Diffstat (limited to 'lib/sidebars/projects/menus/issues_menu.rb')
-rw-r--r-- | lib/sidebars/projects/menus/issues_menu.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/sidebars/projects/menus/issues_menu.rb b/lib/sidebars/projects/menus/issues_menu.rb index 3774bec2f13..51eea3d850d 100644 --- a/lib/sidebars/projects/menus/issues_menu.rb +++ b/lib/sidebars/projects/menus/issues_menu.rb @@ -8,7 +8,7 @@ module Sidebars override :configure_menu_items def configure_menu_items - return unless can?(context.current_user, :read_issue, context.project) + return false unless show_issues_menu_items? add_item(list_menu_item) add_item(boards_menu_item) @@ -70,6 +70,10 @@ module Sidebars private + def show_issues_menu_items? + can?(context.current_user, :read_issue, context.project) + end + def list_menu_item ::Sidebars::MenuItem.new( title: _('List'), |