diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-02-05 20:17:58 +0100 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-02-05 20:17:58 +0100 |
commit | 08064767615ad7b0e2599aed94c53117516e8377 (patch) | |
tree | c7a60aebc44fa1dc5c387adfdae1cf8a0e7ff4aa | |
parent | 170ca8435a6b881231476b372122cf7e5b028736 (diff) | |
download | gitlab-ce-08064767615ad7b0e2599aed94c53117516e8377.tar.gz |
Remove current_user && when can? is used
-rw-r--r-- | app/views/admin/builds/_build.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/builds/show.html.haml | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/views/admin/builds/_build.html.haml b/app/views/admin/builds/_build.html.haml index bd7fb0b36f4..34d955568f2 100644 --- a/app/views/admin/builds/_build.html.haml +++ b/app/views/admin/builds/_build.html.haml @@ -63,7 +63,7 @@ - if can?(current_user, :read_build, project) && build.artifacts? = link_to build.artifacts_download_url, title: 'Download artifacts' do %i.fa.fa-download - - if current_user && can?(current_user, :update_build, build.project) + - if can?(current_user, :update_build, build.project) - if build.active? - if build.cancel_url = link_to build.cancel_url, method: :post, title: 'Cancel' do diff --git a/app/views/projects/builds/show.html.haml b/app/views/projects/builds/show.html.haml index c43d6c3b427..ca1441a20d8 100644 --- a/app/views/projects/builds/show.html.haml +++ b/app/views/projects/builds/show.html.haml @@ -101,7 +101,7 @@ .build-widget %h4.title Build ##{@build.id} - - if current_user && can?(current_user, :update_build, @project) + - if can?(current_user, :update_build, @project) .pull-right - if @build.cancel_url = link_to "Cancel", @build.cancel_url, class: 'btn btn-sm btn-danger', method: :post |