Story#109590460 - update what contact ident attributes can be changed through EPP

This commit is contained in:
Vladimir Krylov 2015-12-14 13:47:01 +02:00
parent 908a033b73
commit 79b1125976

View file

@ -162,10 +162,13 @@ class Epp::Contact < Contact
if ident_frame && ident_attr_valid?(ident_frame) if ident_frame && ident_attr_valid?(ident_frame)
if ident_country_code.blank? && ident_type.in?(%w(org priv).freeze) if ident_country_code.blank? && ident_type.in?(%w(org priv).freeze)
at.merge!(ident_country_code: ident_frame.attr('cc')) at.merge!(ident_country_code: ident_frame.attr('cc'), ident_type: ident_type)
end elsif ident_type == "birthday" && ident !=~ /\d{4}-\d{2}-\d{2}/
if ident_type == "birthday" && ident !=~ /\d{4}-\d{2}-\d{2}/
at.merge!(ident: ident_frame.text) at.merge!(ident: ident_frame.text)
at.merge!(ident_country_code: ident_frame.attr('cc')) if ident_frame.attr('cc').present?
elsif ident_type.blank? && ident_type.blank?
at.merge!(ident_type: ident_type)
at.merge!(ident_country_code: ident_frame.attr('cc')) if ident_frame.attr('cc').present?
end end
end end
end end