gitlab-org--gitlab-foss/app/serializers/merge_request_sidebar_basic_entity.rb
2018-12-20 07:28:28 +08:00

11 lines
338 B
Ruby

# 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