mirror of
https://github.com/internetee/registry.git
synced 2025-05-16 17:37:17 +02:00
Hosts attribute for domain info
This commit is contained in:
parent
a3cb7aed41
commit
aa2b46241a
5 changed files with 85 additions and 6 deletions
|
@ -17,6 +17,17 @@ class Epp::DomainsController < EppController
|
|||
|
||||
def info
|
||||
authorize! :info, @domain, @password
|
||||
@hosts = params[:parsed_frame].css('name').first['hosts'] || 'all'
|
||||
|
||||
case @hosts
|
||||
when 'del'
|
||||
@nameservers = @domain.delegated_nameservers
|
||||
when 'sub'
|
||||
@nameservers = @domain.subordinate_nameservers
|
||||
when 'all'
|
||||
@nameservers = @domain.nameservers
|
||||
end
|
||||
|
||||
render_epp_response '/epp/domains/info'
|
||||
end
|
||||
|
||||
|
@ -88,6 +99,7 @@ class Epp::DomainsController < EppController
|
|||
def validate_info
|
||||
@prefix = 'info > info >'
|
||||
requires('name')
|
||||
optional_attribute 'name', 'hosts', values: %(all, sub, del, none)
|
||||
end
|
||||
|
||||
def validate_check
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue