diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-06-26 19:39:40 -0500 |
---|---|---|
committer | Fatih Acet <acetfatih@gmail.com> | 2017-07-21 22:35:25 +0300 |
commit | cf926f6b7f412c194a47329f101dee1adc6d19dc (patch) | |
tree | edfd3c83e6fe14e2344cfb2b60e31a331e2a9ef3 /app/serializers/discussion_entity.rb | |
parent | ebf915511359c336b99c1127c5b902f8757ba5e0 (diff) | |
download | gitlab-ce-cf926f6b7f412c194a47329f101dee1adc6d19dc.tar.gz |
Remove duplicate attributes from discussion entity and move note.can_edit into note.current_user
Diffstat (limited to 'app/serializers/discussion_entity.rb')
-rw-r--r-- | app/serializers/discussion_entity.rb | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/app/serializers/discussion_entity.rb b/app/serializers/discussion_entity.rb index cb6c3c23807..0a92e3f8167 100644 --- a/app/serializers/discussion_entity.rb +++ b/app/serializers/discussion_entity.rb @@ -3,18 +3,8 @@ class DiscussionEntity < Grape::Entity expose :id, :reply_id expose :expanded?, as: :expanded - expose :author, using: UserEntity - - expose :created_at - - expose :last_updated_at, if: -> (discussion, _) { discussion.updated? } - expose :last_updated_by, if: -> (discussion, _) { discussion.updated? }, using: UserEntity expose :notes, using: NoteEntity expose :individual_note?, as: :individual_note - - expose :can_reply do |discussion| - can?(request.current_user, :create_note, discussion.project) - end end |