diff options
Diffstat (limited to 'lib/sidebars/projects')
-rw-r--r-- | lib/sidebars/projects/menus/infrastructure_menu.rb | 2 | ||||
-rw-r--r-- | lib/sidebars/projects/menus/issues_menu.rb | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/sidebars/projects/menus/infrastructure_menu.rb b/lib/sidebars/projects/menus/infrastructure_menu.rb index 1018bdd545b..060a5be5f57 100644 --- a/lib/sidebars/projects/menus/infrastructure_menu.rb +++ b/lib/sidebars/projects/menus/infrastructure_menu.rb @@ -100,7 +100,7 @@ module Sidebars ::Sidebars::MenuItem.new( title: _('Google Cloud'), link: project_google_cloud_index_path(context.project), - active_routes: { controller: [:google_cloud, :service_accounts] }, + active_routes: { controller: [:google_cloud, :service_accounts, :deployments] }, item_id: :google_cloud ) end 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'), |