From c2881acdca9f07a4ea321ada336471d717858fbe Mon Sep 17 00:00:00 2001 From: tsoganov Date: Tue, 18 Mar 2025 16:09:24 +0200 Subject: [PATCH] Updated verify registrant change --- app/interactions/actions/domain_update.rb | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/app/interactions/actions/domain_update.rb b/app/interactions/actions/domain_update.rb index 5a83feadc..0bb8079e6 100644 --- a/app/interactions/actions/domain_update.rb +++ b/app/interactions/actions/domain_update.rb @@ -17,6 +17,8 @@ module Actions ::Actions::BaseAction.maybe_attach_legal_doc(domain, params[:legal_document]) + ask_registrant_verification + commit end @@ -251,8 +253,15 @@ module Actions false end + def ask_registrant_verification + if verify_registrant_change? && !bypass_verify && + Setting.request_confirmation_on_registrant_change_enabled + domain.registrant_verification_asked!(params, params[:registrar]) + end + end + def verify_registrant_change? - return validate_dispute_case if params[:reserved_pw] + return validate_dispute_case if domain.disputed? && params[:reserved_pw].present? return false if !@changes_registrant || true?(params[:registrant][:verified]) return true unless domain.disputed? @@ -274,19 +283,9 @@ module Actions end end - def ask_registrant_verification - if verify_registrant_change? && !bypass_verify && - Setting.request_confirmation_on_registrant_change_enabled - domain.registrant_verification_asked!(params, params[:registrar]) - end - end - def commit return false if any_errors? - ask_registrant_verification - return false if any_errors? - domain.save end