Conditionally send variable values
We only want to send trigger variable values if the user is a maintainer.
This commit is contained in:
parent
6c83c2d8b9
commit
058de0d401
|
@ -3,5 +3,6 @@
|
||||||
class TriggerVariableEntity < Grape::Entity
|
class TriggerVariableEntity < Grape::Entity
|
||||||
include RequestAwareEntity
|
include RequestAwareEntity
|
||||||
|
|
||||||
expose :key, :value, :public
|
expose :key, :public
|
||||||
|
expose :value, if: ->(_, _) { request.project.team.maintainer?(request.current_user) }
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue