summaryrefslogtreecommitdiff
path: root/app/views/projects/commits/_commit.html.haml
diff options
context:
space:
mode:
authorKamil TrzciƄski <kamil@gitlab.com>2019-01-28 12:12:30 +0000
committerYorick Peterse <yorickpeterse@gmail.com>2019-01-31 16:52:50 +0100
commitd4c7214799586a9b5063b0ea5b4327bbffe1170f (patch)
tree5e39656039d6f73e19b4cbc3575dba65d44aee4d /app/views/projects/commits/_commit.html.haml
parent4b868ba8e71be9aa5591378555122d76c27ac777 (diff)
downloadgitlab-ce-d4c7214799586a9b5063b0ea5b4327bbffe1170f.tar.gz
[master] Pipelines section is available to unauthorized users
Diffstat (limited to 'app/views/projects/commits/_commit.html.haml')
-rw-r--r--app/views/projects/commits/_commit.html.haml5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/views/projects/commits/_commit.html.haml b/app/views/projects/commits/_commit.html.haml
index 1a74b120c26..0d3c6e7027c 100644
--- a/app/views/projects/commits/_commit.html.haml
+++ b/app/views/projects/commits/_commit.html.haml
@@ -6,6 +6,7 @@
- merge_request = local_assigns.fetch(:merge_request, nil)
- project = local_assigns.fetch(:project) { merge_request&.project }
- ref = local_assigns.fetch(:ref) { merge_request&.source_branch }
+- commit_status = commit.present(current_user: current_user).status_for(ref)
- link = commit_path(project, commit, merge_request: merge_request)
%li.commit.flex-row.js-toggle-container{ id: "commit-#{commit.short_id}" }
@@ -22,7 +23,7 @@
%span.commit-row-message.d-block.d-sm-none
&middot;
= commit.short_id
- - if commit.status(ref)
+ - if commit_status
.d-block.d-sm-none
= render_commit_status(commit, ref: ref)
- if commit.description?
@@ -45,7 +46,7 @@
- else
= render partial: 'projects/commit/ajax_signature', locals: { commit: commit }
- - if commit.status(ref)
+ - if commit_status
= render_commit_status(commit, ref: ref)
.js-commit-pipeline-status{ data: { endpoint: pipelines_project_commit_path(project, commit.id, ref: ref) } }