Fix EPP contact:update ident change

#569
This commit is contained in:
Artur Beljajev 2017-08-19 01:29:42 +03:00
parent feb8d83a26
commit d8118878b1

View file

@ -153,15 +153,15 @@ class Epp::Contact < Contact
self.deliver_emails = true # turn on email delivery for epp
if frame.css('ident').first
ident_frame = frame.css('ident').first
# https://github.com/internetee/registry/issues/576
if ident_frame
if identifier.valid?
deny_ident_update
else
if ident_frame && ident_attr_valid?(ident_frame)
deny_ident_update if ident_frame.text != ident
ident_change_disallowed = ident_frame.text.present? && (ident_frame.text != ident)
deny_ident_update if ident_change_disallowed
identifier = Ident.new(code: ident,
type: ident_frame.attr('type'),
@ -174,7 +174,6 @@ class Epp::Contact < Contact
self.ident_updated_at ||= Time.zone.now
end
end
end
self.upid = current_user.registrar.id if current_user.registrar
self.up_date = Time.zone.now