Check if user can trigger manual action in the UI

This commit is contained in:
Grzegorz Bizon 2017-04-06 15:32:23 +02:00
parent d96e907347
commit 3e55e07422

View file

@ -101,7 +101,7 @@
= link_to cancel_namespace_project_build_path(build.project.namespace, build.project, build, return_to: request.original_url), method: :post, title: 'Cancel', class: 'btn btn-build' do
= icon('remove', class: 'cred')
- elsif allow_retry
- if build.playable? && !admin
- if build.playable? && !admin && build.can_play?(current_user)
= link_to play_namespace_project_build_path(build.project.namespace, build.project, build, return_to: request.original_url), method: :post, title: 'Play', class: 'btn btn-build' do
= custom_icon('icon_play')
- elsif build.retryable?