debian-mirror-gitlab/app/serializers/merge_request_assignee_entity.rb
2020-05-25 16:23:42 +05:30

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')