registrant update change #2557

This commit is contained in:
Priit Tark 2015-06-12 19:20:08 +03:00
parent 51d22af52b
commit 64bd2b957f
9 changed files with 68 additions and 35 deletions

View file

@ -394,14 +394,25 @@ class Epp::Domain < Domain
at[:dnskeys_attributes] += at_add[:dnskeys_attributes]
at[:domain_statuses_attributes] += at_add[:domain_statuses_attributes]
if frame.css('registrant').present? && frame.css('registrant').attr('verified').to_s.downcase != 'yes'
registrant_verification_asked!
if frame.css('registrant').present? && frame.css('registrant').attr('verified').to_s.downcase != 'yes' && !pending_update?
registrant_verification_asked!(frame.to_s, current_user.id)
end
self.deliver_emails = true # turn on email delivery for epp
errors.empty? && super(at)
end
def apply_pending_update!
preclean_pendings
user = ApiUser.find(pending_json['current_user_id'])
frame = Nokogiri::XML(pending_json['frame'])
domain_statuses.where(value: DomainStatus::PENDING_UPDATE).destroy_all
domain_statuses.reload
if update(frame, user)
clean_pendings!
end
end
def attach_legal_document(legal_document_data)
return unless legal_document_data