gitlab-org--gitlab-foss/app/serializers/merge_request_sidebar_basic_entity.rb

12 lines
338 B
Ruby
Raw Normal View History

2018-11-29 23:03:35 -05:00
# frozen_string_literal: true
class MergeRequestSidebarBasicEntity < IssuableSidebarBasicEntity
expose :assignee, if: lambda { |issuable| issuable.assignee } do
expose :assignee, merge: true, using: API::Entities::UserBasic
expose :can_merge do |issuable|
issuable.can_be_merged_by?(issuable.assignee)
end
end
end