2018-11-18 11:00:15 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2021-02-22 17:27:13 +05:30
|
|
|
class MergeRequestUserEntity < ::API::Entities::UserBasic
|
|
|
|
expose :can_merge do |reviewer, options|
|
|
|
|
options[:merge_request]&.can_be_merged_by?(reviewer)
|
2018-11-08 19:23:39 +05:30
|
|
|
end
|
|
|
|
end
|
2021-02-22 17:27:13 +05:30
|
|
|
|
|
|
|
MergeRequestUserEntity.prepend_if_ee('EE::MergeRequestUserEntity')
|