BigW Consortium Gitlab

Commit 7bcca228 by Grzegorz Bizon

Check branch permission in manual action entity

parent 3e55e074
...@@ -13,4 +13,12 @@ class BuildActionEntity < Grape::Entity ...@@ -13,4 +13,12 @@ class BuildActionEntity < Grape::Entity
end end
expose :playable?, as: :playable expose :playable?, as: :playable
private
alias_method :build, :object
def playable?
build.playable? && build.can_play?(request.user)
end
end end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment