debian-mirror-gitlab/app/serializers/merge_request_sidebar_basic_entity.rb
2019-02-13 22:33:31 +05:30

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