Modified validate dispute case

This commit is contained in:
tsoganov 2025-03-18 16:34:03 +02:00
parent ad05aa0d36
commit d10f3d3b2c

View file

@ -261,26 +261,26 @@ module Actions
end end
def verify_registrant_change? def verify_registrant_change?
return validate_dispute_case if domain.disputed? && params[:reserved_pw].present? return validate_dispute_case if domain.disputed?
return false if !@changes_registrant || true?(params[:registrant][:verified]) return false if !@changes_registrant || true?(params[:registrant][:verified])
return true unless domain.disputed?
domain.add_epp_error('2304', nil, nil, 'Required parameter missing; reservedpw element ' \
'required for dispute domains')
true true
end end
def validate_dispute_case def validate_dispute_case
dispute = Dispute.active.find_by(domain_name: domain.name, password: params[:reserved_pw]) dispute = Dispute.active.find_by(domain_name: domain.name, password: params[:reserved_pw])
if dispute Dispute.close_by_domain(domain.name) and return false if dispute
Dispute.close_by_domain(domain.name)
false if params[:reserved_pw].present?
domain.add_epp_error(
'2202', nil, nil, 'Invalid authorization information; invalid reserved>pw value'
)
else else
domain.add_epp_error('2202', nil, nil, domain.add_epp_error(
'Invalid authorization information; invalid reserved>pw value') '2304', nil, nil, 'Required parameter missing; reservedpw element required for dispute domains'
true )
end end
true
end end
def commit def commit