Commit 6186ac2c authored by Grzegorz Bizon's avatar Grzegorz Bizon

Expose created_at and updated_at in pipeline entity

parent 77482829
...@@ -64,6 +64,8 @@ class PipelineEntity < Grape::Entity ...@@ -64,6 +64,8 @@ class PipelineEntity < Grape::Entity
pipeline.project, pipeline.id) pipeline.project, pipeline.id)
end end
expose :created_at, :updated_at
def created_exposure? def created_exposure?
!incremental? || created? !incremental? || created?
end end
......
...@@ -9,10 +9,6 @@ module RequestAwareEntity ...@@ -9,10 +9,6 @@ module RequestAwareEntity
@options.fetch(:request) @options.fetch(:request)
end end
def current_user
@options.fetch(:current_user)
end
def can?(object, action, subject) def can?(object, action, subject)
Ability.allowed?(object, action, subject) Ability.allowed?(object, action, subject)
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