mirror of
https://github.com/internetee/registry.git
synced 2025-07-03 09:43:36 +02:00
Honor legacy domains without versions #2778
This commit is contained in:
parent
4b1bf92a27
commit
c10ad96947
2 changed files with 116 additions and 109 deletions
|
@ -1,125 +1,126 @@
|
||||||
- children = HashWithIndifferentAccess.new(version.children)
|
- if version.present? && domain.present?
|
||||||
- nameservers = children[:nameservers] || []
|
- children = HashWithIndifferentAccess.new(version.children)
|
||||||
- tech_contacts = children[:tech_contacts] || []
|
- nameservers = children[:nameservers] || []
|
||||||
- admin_contacts = children[:admin_contacts] || []
|
- tech_contacts = children[:tech_contacts] || []
|
||||||
- registrant = children[:registrant] || []
|
- admin_contacts = children[:admin_contacts] || []
|
||||||
|
- registrant = children[:registrant] || []
|
||||||
|
|
||||||
%td
|
%td
|
||||||
%p.nowrap
|
%p.nowrap
|
||||||
= l(domain.updated_at, format: :short)
|
= l(domain.updated_at, format: :short)
|
||||||
= version.event
|
= version.event
|
||||||
%p.text-right
|
%p.text-right
|
||||||
= version.terminator
|
= version.terminator
|
||||||
|
|
||||||
%td
|
%td
|
||||||
%p
|
|
||||||
= "#{domain.period}#{domain.period_unit}"
|
|
||||||
= "#{l(domain.valid_from, format: :date)} - #{l(domain.valid_to, format: :date)}"
|
|
||||||
%p
|
|
||||||
= domain.status
|
|
||||||
|
|
||||||
%td
|
|
||||||
- registrant.each do |oc|
|
|
||||||
%p
|
%p
|
||||||
= oc[:name]
|
= "#{domain.period}#{domain.period_unit}"
|
||||||
= oc[:phone]
|
= "#{l(domain.valid_from, format: :date)} - #{l(domain.valid_to, format: :date)}"
|
||||||
= oc[:email]
|
|
||||||
%p
|
%p
|
||||||
= oc[:code]
|
= domain.status
|
||||||
|
|
||||||
%td
|
%td
|
||||||
- admin_contacts.each do |ac|
|
- registrant.each do |oc|
|
||||||
|
%p
|
||||||
|
= oc[:name]
|
||||||
|
= oc[:phone]
|
||||||
|
= oc[:email]
|
||||||
|
%p
|
||||||
|
= oc[:code]
|
||||||
|
|
||||||
|
%td
|
||||||
|
- admin_contacts.each do |ac|
|
||||||
|
%p
|
||||||
|
= ac[:name]
|
||||||
|
= ac[:phone]
|
||||||
|
= ac[:email]
|
||||||
|
%p
|
||||||
|
= ac[:code]
|
||||||
|
|
||||||
|
%td
|
||||||
|
- tech_contacts.each do |tc|
|
||||||
|
%p
|
||||||
|
= tc[:name]
|
||||||
|
= tc[:phone]
|
||||||
|
= tc[:email]
|
||||||
|
%p
|
||||||
|
= tc[:code]
|
||||||
|
|
||||||
|
%td
|
||||||
|
- nameservers.each do |ns|
|
||||||
|
%p
|
||||||
|
= ns[:hostname]
|
||||||
|
%br
|
||||||
|
= ns[:ipv4]
|
||||||
|
= ns[:ipv6]
|
||||||
|
|
||||||
|
%td
|
||||||
%p
|
%p
|
||||||
= ac[:name]
|
= domain.registrar.name
|
||||||
= ac[:phone]
|
|
||||||
= ac[:email]
|
|
||||||
%p
|
|
||||||
= ac[:code]
|
|
||||||
|
|
||||||
%td
|
-# %td
|
||||||
- tech_contacts.each do |tc|
|
-# = version.children.inspect
|
||||||
%p
|
|
||||||
= tc[:name]
|
|
||||||
= tc[:phone]
|
|
||||||
= tc[:email]
|
|
||||||
%p
|
|
||||||
= tc[:code]
|
|
||||||
|
|
||||||
%td
|
-# %td{ class: changes.include?(:domain) ? 'edit-highlight' : 'no-highlight' }
|
||||||
- nameservers.each do |ns|
|
-# - if children[:domain]
|
||||||
%p
|
|
||||||
= ns[:hostname]
|
|
||||||
%br
|
|
||||||
= ns[:ipv4]
|
|
||||||
= ns[:ipv6]
|
|
||||||
|
|
||||||
%td
|
|
||||||
%p
|
|
||||||
= domain.registrar.name
|
|
||||||
|
|
||||||
-# %td
|
|
||||||
-# = version.children.inspect
|
|
||||||
|
|
||||||
-# %td{ class: changes.include?(:domain) ? 'edit-highlight' : 'no-highlight' }
|
|
||||||
-# - if children[:domain]
|
|
||||||
-# %p{:style => "font-size:x-small;"}
|
|
||||||
-# = children[:domain][:period]
|
|
||||||
-# = children[:domain][:period_unit] if children[:domain][:period]
|
|
||||||
-# - if children[:domain][:valid_to] && children[:domain][:valid_from]
|
|
||||||
-# = ","
|
|
||||||
-# = l(children[:domain][:valid_from], format: :date) + '-' + l(children[:domain][:valid_to], format: :date)
|
|
||||||
-# - if children[:domain].try(:[], :registrar_id)
|
|
||||||
-# = ","
|
|
||||||
-# = Registrar.find(children[:domain][:registrar_id]).try(:name)
|
|
||||||
-# - if children[:domain][:status]
|
|
||||||
-# = ',' + children[:domain][:status]
|
|
||||||
|
|
||||||
|
|
||||||
-# %td{ class: changes.include?(:registrant) ? 'edit-highlight' : 'no-highlight' }
|
|
||||||
-# - if children[:registrant]
|
|
||||||
-# %p{:style => "font-size:x-small;"}
|
|
||||||
-# = children[:registrant][:name]
|
|
||||||
-# = ","
|
|
||||||
-# = children[:registrant][:phone]
|
|
||||||
-# = ","
|
|
||||||
-# = children[:registrant][:email]
|
|
||||||
-# = ","
|
|
||||||
-# = children[:registrant][:code]
|
|
||||||
|
|
||||||
-# %td{ class: changes.include?(:admin_contacts) ? 'edit-highlight' : 'no-highlight' }
|
|
||||||
-# - if children[:admin_contacts]
|
|
||||||
-# - children[:admin_contacts].each do |ac|
|
|
||||||
-# %p{:style => "font-size:x-small;"}
|
-# %p{:style => "font-size:x-small;"}
|
||||||
-# = ac[:name]
|
-# = children[:domain][:period]
|
||||||
-# = ","
|
-# = children[:domain][:period_unit] if children[:domain][:period]
|
||||||
-# = ac[:phone]
|
-# - if children[:domain][:valid_to] && children[:domain][:valid_from]
|
||||||
-# = ","
|
-# = ","
|
||||||
-# = ac[:email]
|
-# = l(children[:domain][:valid_from], format: :date) + '-' + l(children[:domain][:valid_to], format: :date)
|
||||||
-# = ","
|
-# - if children[:domain].try(:[], :registrar_id)
|
||||||
-# = ac[:code]
|
-# = ","
|
||||||
|
-# = Registrar.find(children[:domain][:registrar_id]).try(:name)
|
||||||
|
-# - if children[:domain][:status]
|
||||||
|
-# = ',' + children[:domain][:status]
|
||||||
|
|
||||||
-# %td{ class: changes.include?(:tech_contacts) ? 'edit-highlight' : 'no-highlight' }
|
|
||||||
-# - if children[:tech_contacts]
|
-# %td{ class: changes.include?(:registrant) ? 'edit-highlight' : 'no-highlight' }
|
||||||
-# - children[:tech_contacts].each do |tc|
|
-# - if children[:registrant]
|
||||||
-# %p{:style => "font-size:x-small;"}
|
-# %p{:style => "font-size:x-small;"}
|
||||||
-# = tc[:name]
|
-# = children[:registrant][:name]
|
||||||
-# = ","
|
-# = ","
|
||||||
-# = tc[:phone]
|
-# = children[:registrant][:phone]
|
||||||
-# = ","
|
-# = ","
|
||||||
-# = tc[:email]
|
-# = children[:registrant][:email]
|
||||||
-# = ","
|
-# = ","
|
||||||
-# = tc[:code]
|
-# = children[:registrant][:code]
|
||||||
|
|
||||||
-# %td{ class: changes.include?(:nameservers) ? 'edit-highlight' : 'no-highlight' }
|
-# %td{ class: changes.include?(:admin_contacts) ? 'edit-highlight' : 'no-highlight' }
|
||||||
-# - if children[:nameservers]
|
-# - if children[:admin_contacts]
|
||||||
-# - children[:nameservers].each do |ns|
|
-# - children[:admin_contacts].each do |ac|
|
||||||
-# %p{:style => "font-size:x-small;"}
|
-# %p{:style => "font-size:x-small;"}
|
||||||
-# = ns[:hostname]
|
-# = ac[:name]
|
||||||
-# = ","
|
-# = ","
|
||||||
-# = ns[:ipv4] || ns[:ipv6]
|
-# = ac[:phone]
|
||||||
|
-# = ","
|
||||||
|
-# = ac[:email]
|
||||||
|
-# = ","
|
||||||
|
-# = ac[:code]
|
||||||
|
|
||||||
-# %td
|
-# %td{ class: changes.include?(:tech_contacts) ? 'edit-highlight' : 'no-highlight' }
|
||||||
-# %p{ :style => 'font-size:x-small;' }
|
-# - if children[:tech_contacts]
|
||||||
-# = l(version.created_at, format: :short)
|
-# - children[:tech_contacts].each do |tc|
|
||||||
-# = whodunnit_with_protocol(version.whodunnit)
|
-# %p{:style => "font-size:x-small;"}
|
||||||
-# = version.event
|
-# = tc[:name]
|
||||||
|
-# = ","
|
||||||
|
-# = tc[:phone]
|
||||||
|
-# = ","
|
||||||
|
-# = tc[:email]
|
||||||
|
-# = ","
|
||||||
|
-# = tc[:code]
|
||||||
|
|
||||||
|
-# %td{ class: changes.include?(:nameservers) ? 'edit-highlight' : 'no-highlight' }
|
||||||
|
-# - if children[:nameservers]
|
||||||
|
-# - children[:nameservers].each do |ns|
|
||||||
|
-# %p{:style => "font-size:x-small;"}
|
||||||
|
-# = ns[:hostname]
|
||||||
|
-# = ","
|
||||||
|
-# = ns[:ipv4] || ns[:ipv6]
|
||||||
|
|
||||||
|
-# %td
|
||||||
|
-# %p{ :style => 'font-size:x-small;' }
|
||||||
|
-# = l(version.created_at, format: :short)
|
||||||
|
-# = whodunnit_with_protocol(version.whodunnit)
|
||||||
|
-# = version.event
|
||||||
|
|
|
@ -184,6 +184,12 @@ describe 'EPP Contact', epp: true do
|
||||||
response[:result_code].should == '2005'
|
response[:result_code].should == '2005'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
fit 'should not allow spaces in custom code' do
|
||||||
|
response = create_request({ id: { value: '1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111' } })
|
||||||
|
response[:msg].should == 'is invalid [code]'
|
||||||
|
response[:result_code].should == '2005'
|
||||||
|
end
|
||||||
|
|
||||||
it 'should not saves ident type with wrong country code' do
|
it 'should not saves ident type with wrong country code' do
|
||||||
extension = {
|
extension = {
|
||||||
ident: {
|
ident: {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue