Conditionally send variable values

We only want to send trigger variable values if the user is a
maintainer.
This commit is contained in:
jhampton 2018-12-03 11:56:49 -05:00
parent 6c83c2d8b9
commit 058de0d401
1 changed files with 2 additions and 1 deletions

View File

@ -3,5 +3,6 @@
class TriggerVariableEntity < Grape::Entity
include RequestAwareEntity
expose :key, :value, :public
expose :key, :public
expose :value, if: ->(_, _) { request.project.team.maintainer?(request.current_user) }
end