Merge branch 'master' of github.com:domify/registry

This commit is contained in:
Martin Lensment 2015-07-31 16:31:31 +03:00
commit 246645079d

View file

@ -395,6 +395,7 @@ class Epp::Domain < Domain
end end
# rubocop: disable Metrics/AbcSize # rubocop: disable Metrics/AbcSize
# rubocop: disable Metrics/CyclomaticComplexity
def update(frame, current_user, verify = true) def update(frame, current_user, verify = true)
return super if frame.blank? return super if frame.blank?
at = {}.with_indifferent_access at = {}.with_indifferent_access
@ -411,15 +412,17 @@ class Epp::Domain < Domain
# at[:statuses] += at_add[:domain_statuses_attributes] # at[:statuses] += at_add[:domain_statuses_attributes]
if verify && Setting.request_confrimation_on_registrant_change_enabled && if verify &&
frame.css('registrant').present? && Setting.request_confrimation_on_registrant_change_enabled &&
frame.css('registrant').attr('verified').to_s.downcase != 'yes' frame.css('registrant').present? &&
frame.css('registrant').attr('verified').to_s.downcase != 'yes'
registrant_verification_asked!(frame.to_s, current_user.id) registrant_verification_asked!(frame.to_s, current_user.id)
end end
self.deliver_emails = true # turn on email delivery for epp self.deliver_emails = true # turn on email delivery for epp
errors.empty? && super(at) errors.empty? && super(at)
end end
# rubocop: enable Metrics/AbcSize # rubocop: enable Metrics/AbcSize
# rubocop: enable Metrics/CyclomaticComplexity
def apply_pending_update! def apply_pending_update!
old_registrant_email = DomainMailer.registrant_updated_notification_for_old_registrant(self) old_registrant_email = DomainMailer.registrant_updated_notification_for_old_registrant(self)
@ -458,8 +461,8 @@ class Epp::Domain < Domain
return false unless valid? return false unless valid?
if verify && if verify &&
Setting.request_confirmation_on_domain_deletion_enabled && Setting.request_confirmation_on_domain_deletion_enabled &&
frame.css('delete').attr('verified').to_s.downcase != 'yes' frame.css('delete').attr('verified').to_s.downcase != 'yes'
registrant_verification_asked!(frame.to_s, user_id) registrant_verification_asked!(frame.to_s, user_id)
self.deliver_emails = true # turn on email delivery for epp self.deliver_emails = true # turn on email delivery for epp