Expose created_at and updated_at in pipeline entity
This commit is contained in:
parent
7748282996
commit
6186ac2c3d
|
@ -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
|
||||||
@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
|
||||||
|
|
Loading…
Reference in New Issue