summaryrefslogtreecommitdiff
path: root/app/helpers/projects_helper.rb
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2017-05-05 20:16:54 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2017-06-13 09:52:48 +0200
commita4a3da764ae88c4de95f15f1069df9a43425c029 (patch)
tree475563ce433040441a7524213cd487913b39cb69 /app/helpers/projects_helper.rb
parent6f5a68f528d6c11f3bfd013e30cc71845abe6ef8 (diff)
downloadgitlab-ce-a4a3da764ae88c4de95f15f1069df9a43425c029.tar.gz
Allow to access pipelines even if they are disabled, but only present jobs and commit statuses without giving ability to access them
Diffstat (limited to 'app/helpers/projects_helper.rb')
-rw-r--r--app/helpers/projects_helper.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb
index 7441b58fddb..c11dd49f4a7 100644
--- a/app/helpers/projects_helper.rb
+++ b/app/helpers/projects_helper.rb
@@ -218,6 +218,10 @@ module ProjectsHelper
nav_tabs << :container_registry
end
+ if project.builds_enabled? && can?(current_user, :read_pipeline, project)
+ nav_tabs << :pipelines
+ end
+
tab_ability_map.each do |tab, ability|
if can?(current_user, ability, project)
nav_tabs << tab
@@ -231,7 +235,6 @@ module ProjectsHelper
{
environments: :read_environment,
milestones: :read_milestone,
- pipelines: :read_pipeline,
snippets: :read_project_snippet,
settings: :admin_project,
builds: :read_build,