summaryrefslogtreecommitdiff
path: root/app/views/builds/show.html.haml
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-01-22 16:30:06 -0800
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-01-22 16:30:06 -0800
commit1533f3404621bd088cbe78ac7e2a14edc9915691 (patch)
tree6c56c4cc757eea9638c260fa23a13092ed4d8c33 /app/views/builds/show.html.haml
parent478735db63e2d1291fdb40908e1de329a2ea5056 (diff)
downloadgitlab-ci-1533f3404621bd088cbe78ac7e2a14edc9915691.tar.gz
Build page is visible for other people
Diffstat (limited to 'app/views/builds/show.html.haml')
-rw-r--r--app/views/builds/show.html.haml20
1 files changed, 11 insertions, 9 deletions
diff --git a/app/views/builds/show.html.haml b/app/views/builds/show.html.haml
index cd0bba5..080aec4 100644
--- a/app/views/builds/show.html.haml
+++ b/app/views/builds/show.html.haml
@@ -2,10 +2,11 @@
= @project.name
@
= @commit.short_sha
- .pull-right
- = link_to edit_project_path(@project), class: "btn btn-default btn-small" do
- %i.icon-edit.icon-white
- Edit Project
+ - if current_user.can_manage_project?(@project.gitlab_id)
+ .pull-right
+ = link_to edit_project_path(@project), class: "btn btn-default btn-small" do
+ %i.icon-edit.icon-white
+ Edit Project
%p
= link_to project_commit_path(@project, @build.commit) do
@@ -81,11 +82,12 @@
.build-widget
%h4.title
Build
- .pull-right
- - if @build.active?
- = link_to "Cancel", cancel_project_build_path(@project, @build), class: 'btn btn-sm btn-danger'
- - else
- = link_to "Retry", retry_project_build_path(@project, @build), class: 'btn btn-sm btn-primary', method: :post
+ - if current_user.can_manage_project?(@project.gitlab_id)
+ .pull-right
+ - if @build.active?
+ = link_to "Cancel", cancel_project_build_path(@project, @build), class: 'btn btn-sm btn-danger'
+ - else
+ = link_to "Retry", retry_project_build_path(@project, @build), class: 'btn btn-sm btn-primary', method: :post
- if @build.duration
%p