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

9 lines
279 B
Ruby

# frozen_string_literal: true
class MergeRequestAssigneeEntity < ::API::Entities::UserBasic
expose :can_merge do |assignee, options|
options[:merge_request]&.can_be_merged_by?(assignee)
end
end
MergeRequestAssigneeEntity.prepend_if_ee('EE::MergeRequestAssigneeEntity')