Skip to content
Snippets Groups Projects
Commit 7bcca228 authored by Grzegorz Bizon's avatar Grzegorz Bizon
Browse files

Check branch permission in manual action entity

parent 3e55e074
No related branches found
No related tags found
2 merge requests!11056WIP: Resolve "Display performance deltas between app deployments on Merge Request workflow",!10494Check access to a branch when user triggers manual action
Pipeline #
Loading
@@ -13,4 +13,12 @@ class BuildActionEntity < Grape::Entity
Loading
@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment