Remove current_user && when can? is used
This commit is contained in:
parent
170ca8435a
commit
0806476761
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue