diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-04-12 14:48:43 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-04-12 14:48:43 +0300 |
commit | 2aa211fa69ffd02ba11757e06e19d34f6ca51865 (patch) | |
tree | cba18999257837397d1a0bcfb8e6e3de843362ff /app/serializers/build_action_entity.rb | |
parent | 55aa727eff50a9472405b302645abb54f28bdba0 (diff) |
Use build policy to determine if user can play build
Diffstat (limited to 'app/serializers/build_action_entity.rb')
-rw-r--r-- | app/serializers/build_action_entity.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/serializers/build_action_entity.rb b/app/serializers/build_action_entity.rb index 3d12c64b88a..0bb7e561073 100644 --- a/app/serializers/build_action_entity.rb +++ b/app/serializers/build_action_entity.rb @@ -19,6 +19,6 @@ class BuildActionEntity < Grape::Entity alias_method :build, :object def playable? - build.playable? && build.can_play?(request.user) + can?(request.user, :play_build, build) && build.playable? end end |