Check branch permission in manual action entity
This commit is contained in:
parent
3e55e07422
commit
7bcca2284b
|
@ -13,4 +13,12 @@ class BuildActionEntity < Grape::Entity
|
|||
end
|
||||
|
||||
expose :playable?, as: :playable
|
||||
|
||||
private
|
||||
|
||||
alias_method :build, :object
|
||||
|
||||
def playable?
|
||||
build.playable? && build.can_play?(request.user)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue