mirror of
https://github.com/internetee/registry.git
synced 2025-08-12 12:39:34 +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
|
||||
def validate_domain_create_request
|
||||
@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
|
||||
|
||||
def domain_create_params
|
||||
|
|
|
@ -19,9 +19,6 @@ describe 'EPP Helper', epp: true do
|
|||
<domain:contact type="admin">sh8013</domain:contact>
|
||||
<domain:contact type="tech">sh8013</domain:contact>
|
||||
<domain:contact type="tech">sh801333</domain:contact>
|
||||
<domain:authInfo>
|
||||
<domain:pw>2fooBAR</domain:pw>
|
||||
</domain:authInfo>
|
||||
</domain:create>
|
||||
</create>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
|
@ -50,9 +47,6 @@ describe 'EPP Helper', epp: true do
|
|||
<domain:contact type="admin">2323rafaf</domain:contact>
|
||||
<domain:contact type="tech">3dgxx</domain:contact>
|
||||
<domain:contact type="tech">345xxv</domain:contact>
|
||||
<domain:authInfo>
|
||||
<domain:pw>sdgdgd4esfsa</domain:pw>
|
||||
</domain:authInfo>
|
||||
</domain:create>
|
||||
</create>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
|
@ -70,8 +64,7 @@ describe 'EPP Helper', epp: true do
|
|||
{ contact_value: '2323rafaf', contact_type: 'admin' },
|
||||
{ contact_value: '3dgxx', contact_type: 'tech' },
|
||||
{ contact_value: '345xxv', contact_type: 'tech' }
|
||||
],
|
||||
pw: 'sdgdgd4esfsa'
|
||||
]
|
||||
)
|
||||
|
||||
generated = Nokogiri::XML(xml).to_s.squish
|
||||
|
@ -98,8 +91,7 @@ describe 'EPP Helper', epp: true do
|
|||
period: false,
|
||||
nameservers: [],
|
||||
registrant: false,
|
||||
contacts: [],
|
||||
authInfo: false
|
||||
contacts: []
|
||||
)
|
||||
|
||||
generated = Nokogiri::XML(xml).to_s.squish
|
||||
|
|
|
@ -84,10 +84,6 @@ module Epp
|
|||
xml_params[:contacts].each do |x|
|
||||
xml.tag!('domain:contact', x[:contact_value], 'type' => (x[:contact_type]))
|
||||
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
|
||||
xml.clTRID 'ABC-12345'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue