Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-11-12 12:05:57 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-11-12 12:06:42 +0300
commit6186ac2c3d0db6932993ac681cbed6f453499503 (patch)
tree920460fa029d473888f8081250f00c0e8fb5031a /app/serializers
parent7748282996d7754a342b5956b1a277a54a9b26f5 (diff)
Expose created_at and updated_at in pipeline entity
Diffstat (limited to 'app/serializers')
-rw-r--r--app/serializers/pipeline_entity.rb2
-rw-r--r--app/serializers/request_aware_entity.rb4
2 files changed, 2 insertions, 4 deletions
diff --git a/app/serializers/pipeline_entity.rb b/app/serializers/pipeline_entity.rb
index 24fe1602c2d..08346b4ed77 100644
--- a/app/serializers/pipeline_entity.rb
+++ b/app/serializers/pipeline_entity.rb
@@ -64,6 +64,8 @@ class PipelineEntity < Grape::Entity
pipeline.project, pipeline.id)
end
+ expose :created_at, :updated_at
+
def created_exposure?
!incremental? || created?
end
diff --git a/app/serializers/request_aware_entity.rb b/app/serializers/request_aware_entity.rb
index 7a096d9d5a8..e159d750cb7 100644
--- a/app/serializers/request_aware_entity.rb
+++ b/app/serializers/request_aware_entity.rb
@@ -9,10 +9,6 @@ module RequestAwareEntity
@options.fetch(:request)
end
- def current_user
- @options.fetch(:current_user)
- end
-
def can?(object, action, subject)
Ability.allowed?(object, action, subject)
end