mirror of
https://github.com/internetee/registry.git
synced 2025-08-13 04:59:42 +02:00
Remove auth info from domain create builder
This commit is contained in:
parent
6352ed340f
commit
1bf886a6bf
3 changed files with 3 additions and 15 deletions
|
@ -84,7 +84,7 @@ module Epp::DomainsHelper
|
||||||
## CREATE
|
## CREATE
|
||||||
def validate_domain_create_request
|
def validate_domain_create_request
|
||||||
@ph = params_hash['epp']['command']['create']['create']
|
@ph = params_hash['epp']['command']['create']['create']
|
||||||
xml_attrs_present?(@ph, [['name'], ['ns'], ['authInfo'], ['contact'], ['registrant']])
|
xml_attrs_present?(@ph, [['name'], ['ns'], ['contact'], ['registrant']])
|
||||||
end
|
end
|
||||||
|
|
||||||
def domain_create_params
|
def domain_create_params
|
||||||
|
|
|
@ -19,9 +19,6 @@ describe 'EPP Helper', epp: true do
|
||||||
<domain:contact type="admin">sh8013</domain:contact>
|
<domain:contact type="admin">sh8013</domain:contact>
|
||||||
<domain:contact type="tech">sh8013</domain:contact>
|
<domain:contact type="tech">sh8013</domain:contact>
|
||||||
<domain:contact type="tech">sh801333</domain:contact>
|
<domain:contact type="tech">sh801333</domain:contact>
|
||||||
<domain:authInfo>
|
|
||||||
<domain:pw>2fooBAR</domain:pw>
|
|
||||||
</domain:authInfo>
|
|
||||||
</domain:create>
|
</domain:create>
|
||||||
</create>
|
</create>
|
||||||
<clTRID>ABC-12345</clTRID>
|
<clTRID>ABC-12345</clTRID>
|
||||||
|
@ -50,9 +47,6 @@ describe 'EPP Helper', epp: true do
|
||||||
<domain:contact type="admin">2323rafaf</domain:contact>
|
<domain:contact type="admin">2323rafaf</domain:contact>
|
||||||
<domain:contact type="tech">3dgxx</domain:contact>
|
<domain:contact type="tech">3dgxx</domain:contact>
|
||||||
<domain:contact type="tech">345xxv</domain:contact>
|
<domain:contact type="tech">345xxv</domain:contact>
|
||||||
<domain:authInfo>
|
|
||||||
<domain:pw>sdgdgd4esfsa</domain:pw>
|
|
||||||
</domain:authInfo>
|
|
||||||
</domain:create>
|
</domain:create>
|
||||||
</create>
|
</create>
|
||||||
<clTRID>ABC-12345</clTRID>
|
<clTRID>ABC-12345</clTRID>
|
||||||
|
@ -70,8 +64,7 @@ describe 'EPP Helper', epp: true do
|
||||||
{ contact_value: '2323rafaf', contact_type: 'admin' },
|
{ contact_value: '2323rafaf', contact_type: 'admin' },
|
||||||
{ contact_value: '3dgxx', contact_type: 'tech' },
|
{ contact_value: '3dgxx', contact_type: 'tech' },
|
||||||
{ contact_value: '345xxv', contact_type: 'tech' }
|
{ contact_value: '345xxv', contact_type: 'tech' }
|
||||||
],
|
]
|
||||||
pw: 'sdgdgd4esfsa'
|
|
||||||
)
|
)
|
||||||
|
|
||||||
generated = Nokogiri::XML(xml).to_s.squish
|
generated = Nokogiri::XML(xml).to_s.squish
|
||||||
|
@ -98,8 +91,7 @@ describe 'EPP Helper', epp: true do
|
||||||
period: false,
|
period: false,
|
||||||
nameservers: [],
|
nameservers: [],
|
||||||
registrant: false,
|
registrant: false,
|
||||||
contacts: [],
|
contacts: []
|
||||||
authInfo: false
|
|
||||||
)
|
)
|
||||||
|
|
||||||
generated = Nokogiri::XML(xml).to_s.squish
|
generated = Nokogiri::XML(xml).to_s.squish
|
||||||
|
|
|
@ -84,10 +84,6 @@ module Epp
|
||||||
xml_params[:contacts].each do |x|
|
xml_params[:contacts].each do |x|
|
||||||
xml.tag!('domain:contact', x[:contact_value], 'type' => (x[:contact_type]))
|
xml.tag!('domain:contact', x[:contact_value], 'type' => (x[:contact_type]))
|
||||||
end if xml_params[:contacts].any?
|
end if xml_params[:contacts].any?
|
||||||
|
|
||||||
xml.tag!('domain:authInfo') do
|
|
||||||
xml.tag!('domain:pw', xml_params[:pw] || '2fooBAR')
|
|
||||||
end if xml_params[:authInfo] != false
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
xml.clTRID 'ABC-12345'
|
xml.clTRID 'ABC-12345'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue