Refactor some dispute logic

This commit is contained in:
Karl Erik Õunapuu 2020-05-12 14:52:27 +03:00
parent e7ad4a7c64
commit be14ede8b6
8 changed files with 42 additions and 48 deletions

View file

@ -491,10 +491,12 @@ class Epp::Domain < Domain
end
end
unverified_registrant_params = frame.css('registrant').present? &&
frame.css('registrant').attr('verified').to_s.downcase != 'yes'
if !same_registrant_as_current && errors.empty? && verify &&
Setting.request_confrimation_on_registrant_change_enabled &&
frame.css('registrant').present? &&
frame.css('registrant').attr('verified').to_s.downcase != 'yes'
unverified_registrant_params
registrant_verification_asked!(frame.to_s, current_user.id) unless disputed?
end