summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
authorLukas Eipert <leipert@gitlab.com>2018-05-29 11:37:59 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2018-05-29 11:37:59 +0000
commit7a0f15e2c638186d9d4aa8fff38d847cb8f75580 (patch)
treef82af6b337e75f230326636f45bd99f3b817718a /app/helpers
parent792512718086826fb17729566387d16e68950a85 (diff)
downloadgitlab-ce-7a0f15e2c638186d9d4aa8fff38d847cb8f75580.tar.gz
Resolve "Operations navigation menu renders empty menu when user does not have the right permissions"
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/projects_helper.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb
index fa54eafd3a3..55078e1a2d2 100644
--- a/app/helpers/projects_helper.rb
+++ b/app/helpers/projects_helper.rb
@@ -257,6 +257,9 @@ module ProjectsHelper
if project.builds_enabled? && can?(current_user, :read_pipeline, project)
nav_tabs << :pipelines
+ end
+
+ if can?(current_user, :read_environment, project) || can?(current_user, :read_cluster, project)
nav_tabs << :operations
end