From 08064767615ad7b0e2599aed94c53117516e8377 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Fri, 5 Feb 2016 20:17:58 +0100 Subject: Remove current_user && when can? is used --- app/views/admin/builds/_build.html.haml | 2 +- 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 -- cgit v1.2.1