MERGE: merged staging at 3235647, resolved merge conflict

This commit is contained in:
Matt Farnsworth 2015-10-30 16:12:20 +02:00
commit 45588dc72a
78 changed files with 308808 additions and 421 deletions

4
.agignore Normal file
View file

@ -0,0 +1,4 @@
tmp
public/assets
*.svg
import

View file

@ -1,4 +1,4 @@
The MIT License (MIT) The MIT/X11 License (MIT/X11)
Copyright (c) 2014 Estonian Internet Foundation Copyright (c) 2014 Estonian Internet Foundation
@ -18,4 +18,8 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. SOFTWARE.
Except as contained in this notice, the name(s) of the above copyright holders
shall not be used in advertising or otherwise to promote the sale, use or other
dealings in this Software without prior written authorization.

View file

@ -14,3 +14,5 @@ $(document).on 'page:change', ->
# client side validate all forms # client side validate all forms
$('form').each -> $('form').each ->
$(this).validate() $(this).validate()
$('[data-toggle="popover"]').popover()

View file

@ -4,6 +4,7 @@
#= require jquery.validate.additional-methods #= require jquery.validate.additional-methods
#= require turbolinks #= require turbolinks
#= require bootstrap-sprockets #= require bootstrap-sprockets
#= require typeahead.bundle.min
#= require jquery.nested_attributes #= require jquery.nested_attributes
#= require shared/jquery.validate.bootstrap #= require shared/jquery.validate.bootstrap
#= require jquery-ui/datepicker #= require jquery-ui/datepicker
@ -11,4 +12,5 @@
#= require shared/general #= require shared/general
#= require registrar/autocomplete
#= require registrar/application #= require registrar/application

View file

@ -0,0 +1,27 @@
class @Autocomplete
constructor: ->
@buildAutocomplete(el) for el in document.querySelectorAll('[data-autocomplete]')
buildAutocomplete: (el)->
name = el.dataset.autocomplete[1..-1].replace(/\//g, "_") # cahcing
$(el).typeahead 'destroy'
$(el).typeahead(
name: name,
highlight: true,
hint: false
,
displayKey: "display_key"
source: (query, syncResults)->
$.getJSON "#{el.dataset.autocomplete}?query=#{query}", (data)->
syncResults(data)
).on('typeahead:selected', (e, item) ->
console.log e.currentTarget.id
orig = document.querySelector('#' + e.currentTarget.id.replace(/_helper$/, ''))
orig.value = item.value
)
$(document).on "ready page:load", ->
new Autocomplete

View file

@ -3,13 +3,15 @@ class Admin::ReservedDomainsController < AdminController
def index def index
rd = ReservedDomain.first_or_initialize rd = ReservedDomain.first_or_initialize
@reserved_domains = rd.names.to_yaml rd.names = nil if rd.names.blank?
@reserved_domains = rd.names.to_yaml.gsub(/---.?\n/, '').gsub(/\.\.\..?\n/, '')
end end
def create def create
@reserved_domains = params[:reserved_domains] @reserved_domains = params[:reserved_domains]
begin begin
params[:reserved_domains] = "---\n" if params[:reserved_domains].blank?
names = YAML.load(params[:reserved_domains]) names = YAML.load(params[:reserved_domains])
fail if names == false fail if names == false
rescue rescue

View file

@ -116,7 +116,7 @@ class Epp::SessionsController < EppController
def connection_limit_ok? def connection_limit_ok?
return true if Rails.env.test? || Rails.env.development? return true if Rails.env.test? || Rails.env.development?
c = EppSession.where( c = EppSession.where(
'registrar_id = ? AND updated_at >= ?', @api_user.registrar_id, Time.zone.now - 5.minutes 'registrar_id = ? AND updated_at >= ?', @api_user.registrar_id, Time.zone.now - 1.second
).count ).count
return false if c >= 4 return false if c >= 4

View file

@ -150,6 +150,10 @@ class EppController < ApplicationController
end end
@errors.uniq! @errors.uniq!
logger.error "\nFOLLOWING ERRORS OCCURRED ON EPP QUERY:"
logger.error @errors.inspect
logger.error "\n"
# Requested by client, ticket #2688 # Requested by client, ticket #2688
# Known issues: error request is exactly 1 second slower and server can handle less load # Known issues: error request is exactly 1 second slower and server can handle less load

View file

@ -1,6 +1,6 @@
class Registrar::DomainsController < Registrar::DeppController # EPP controller class Registrar::DomainsController < Registrar::DeppController # EPP controller
before_action :init_domain, except: :new before_action :init_domain, except: :new
before_action :init_contacts_autocomplete_map, only: [:new, :edit, :create, :update] helper_method :contacts
# rubocop: disable Metrics/PerceivedComplexity # rubocop: disable Metrics/PerceivedComplexity
# rubocop: disable Metrics/CyclomaticComplexity # rubocop: disable Metrics/CyclomaticComplexity
@ -138,17 +138,27 @@ class Registrar::DomainsController < Registrar::DeppController # EPP controller
end end
end end
def search_contacts
authorize! :create, Depp::Domain
scope = current_user.registrar.contacts.limit(10)
if params[:query].present?
escaped_str = ActiveRecord::Base.connection.quote_string params[:query]
scope = scope.where("name ilike '%#{escaped_str}%' OR code ilike '%#{escaped_str}%' ")
end
render json: scope.pluck(:name, :code).map { |c| {display_key: "#{c.second} #{c.first}", value: c.second} }
end
private private
def init_domain def init_domain
@domain = Depp::Domain.new(current_user: depp_current_user) @domain = Depp::Domain.new(current_user: depp_current_user)
end end
def init_contacts_autocomplete_map
@contacts_autocomplete_map ||= def contacts
current_user.registrar.contacts.pluck(:name, :code).map { |c| ["#{c.second} #{c.first}", c.second] } current_user.registrar.contacts
# @priv_contacts_autocomplete_map ||=
# current_user.registrar.priv_contacts.pluck(:name, :code).map { |c| ["#{c.second} #{c.first}", c.second] }
end end
def normalize_search_parameters def normalize_search_parameters

View file

@ -6,12 +6,16 @@ class DomainUpdateConfirmJob < Que::Job
case action case action
when RegistrantVerification::CONFIRMED when RegistrantVerification::CONFIRMED
domain.poll_message!(:poll_pending_update_confirmed_by_registrant) domain.poll_message!(:poll_pending_update_confirmed_by_registrant)
domain.apply_pending_update! domain.apply_pending_update! do |e|
e.instance_variable_set("@changed_attributes", e.changed_attributes.merge("statuses"=>[]))
end
domain.clean_pendings! domain.clean_pendings!
when RegistrantVerification::REJECTED when RegistrantVerification::REJECTED
DomainMailer.pending_update_rejected_notification_for_new_registrant(domain).deliver_now DomainMailer.pending_update_rejected_notification_for_new_registrant(domain).deliver_now
domain.poll_message!(:poll_pending_update_rejected_by_registrant) domain.poll_message!(:poll_pending_update_rejected_by_registrant)
domain.clean_pendings! domain.clean_pendings!
domain.instance_variable_set("@changed_attributes", domain.changed_attributes.merge("statuses"=>[]))
domain.save
end end
destroy # it's best to destroy the job in the same transaction destroy # it's best to destroy the job in the same transaction
end end

View file

@ -0,0 +1,10 @@
class RegenerateRegistrarWhoisesJob < Que::Job
def run(registrar_id)
# no return as we want restart job if fails
registrar = Registrar.find(registrar_id)
registrar.whois_records.select(:id).find_in_batches(batch_size: 20) do |group|
RegenerateWhoisRecordJob.enqueue group.map(&:id)
end
end
end

View file

@ -0,0 +1,10 @@
class RegenerateWhoisRecordJob < Que::Job
def run(ids)
ids.each do |id|
record = WhoisRecord.find_by(id: id)
return unless record
record.save
end
end
end

View file

@ -345,6 +345,10 @@ class Contact < ActiveRecord::Base
end end
end end
def search_name
"#{code} #{name}"
end
def set_linked def set_linked
statuses << LINKED if statuses.detect { |s| s == LINKED }.blank? statuses << LINKED if statuses.detect { |s| s == LINKED }.blank?
end end

View file

@ -257,7 +257,7 @@ class Domain < ActiveRecord::Base
next unless domain.expirable? next unless domain.expirable?
domain.set_graceful_expired domain.set_graceful_expired
STDOUT << "#{Time.zone.now.utc} Domain.start_expire_period: ##{domain.id} (#{domain.name}) #{domain.changes}\n" unless Rails.env.test? STDOUT << "#{Time.zone.now.utc} Domain.start_expire_period: ##{domain.id} (#{domain.name}) #{domain.changes}\n" unless Rails.env.test?
domain.save(validate: false) domain.save
end end
STDOUT << "#{Time.zone.now.utc} - Successfully expired #{domains.count} domains\n" unless Rails.env.test? STDOUT << "#{Time.zone.now.utc} - Successfully expired #{domains.count} domains\n" unless Rails.env.test?
@ -370,13 +370,16 @@ class Domain < ActiveRecord::Base
def renewable? def renewable?
if Setting.days_to_renew_domain_before_expire != 0 if Setting.days_to_renew_domain_before_expire != 0
if ((valid_to - Time.zone.now.beginning_of_day).to_i / 1.day) + 1 > Setting.days_to_renew_domain_before_expire # if you can renew domain at days_to_renew before domain expiration
if (valid_to.to_date - Date.today) + 1 > Setting.days_to_renew_domain_before_expire
return false return false
end end
end end
return false if statuses.include?(DomainStatus::DELETE_CANDIDATE) || statuses.include?(DomainStatus::FORCE_DELETE) return false if statuses.include_any?(DomainStatus::DELETE_CANDIDATE, DomainStatus::SERVER_RENEW_PROHIBITED,
DomainStatus::CLIENT_RENEW_PROHIBITED, DomainStatus::PENDING_RENEW,
DomainStatus::PENDING_TRANSFER, DomainStatus::PENDING_DELETE,
DomainStatus::PENDING_UPDATE, 'pendingDeleteConfirmation')
true true
end end
@ -636,7 +639,7 @@ class Domain < ActiveRecord::Base
def set_graceful_expired def set_graceful_expired
self.outzone_at = valid_to + Setting.expire_warning_period.days self.outzone_at = valid_to + Setting.expire_warning_period.days
self.delete_at = outzone_at + Setting.redemption_grace_period.days self.delete_at = outzone_at + Setting.redemption_grace_period.days
statuses << DomainStatus::EXPIRED self.statuses |= [DomainStatus::EXPIRED]
end end
def set_expired def set_expired

View file

@ -69,7 +69,7 @@ class DomainStatus < ActiveRecord::Base
SERVER_ADMIN_CHANGE_PROHIBITED = 'serverAdminChangeProhibited' SERVER_ADMIN_CHANGE_PROHIBITED = 'serverAdminChangeProhibited'
SERVER_TECH_CHANGE_PROHIBITED = 'serverTechChangeProhibited' SERVER_TECH_CHANGE_PROHIBITED = 'serverTechChangeProhibited'
PENDING_DELETE_CONFIRMATION = 'pendingDeleteConfirmation' PENDING_DELETE_CONFIRMATION = 'pendingDeleteConfirmation'
FORCE_DELETE = 'forceDelete' FORCE_DELETE = 'serverForceDelete'
DELETE_CANDIDATE = 'deleteCandidate' DELETE_CANDIDATE = 'deleteCandidate'
EXPIRED = 'expired' EXPIRED = 'expired'
RESERVED = 'reserved' RESERVED = 'reserved'
@ -122,6 +122,7 @@ class DomainStatus < ActiveRecord::Base
class << self class << self
def admin_statuses def admin_statuses
<<<<<<< HEAD
[ [
SERVER_HOLD, SERVER_HOLD,
# sync with admin_statuses_map # sync with admin_statuses_map
@ -134,12 +135,31 @@ class DomainStatus < ActiveRecord::Base
SERVER_UPDATE_PROHIBITED, SERVER_UPDATE_PROHIBITED,
SERVER_DELETE_PROHIBITED SERVER_DELETE_PROHIBITED
] ]
=======
# [
# SERVER_HOLD,
# # sync with admin_statuses_map
# # SERVER_MANUAL_INZONE,
# # SERVER_RENEW_PROHIBITED,
# # SERVER_TRANSFER_PROHIBITED,
# # SERVER_REGISTRANT_CHANGE_PROHIBITED,
# # SERVER_ADMIN_CHANGE_PROHIBITED,
# # SERVER_TECH_CHANGE_PROHIBITED,
# SERVER_DELETE_PROHIBITED,
# SERVER_UPDATE_PROHIBITED
# ]
admin_statuses_map.map(&:second)
>>>>>>> staging
end end
def admin_statuses_map def admin_statuses_map
[ [
['Hold', SERVER_HOLD], ['Hold', SERVER_HOLD],
<<<<<<< HEAD
# sync with admin_statuses # sync with admin_statuses
=======
>>>>>>> staging
['ManualInzone', SERVER_MANUAL_INZONE], ['ManualInzone', SERVER_MANUAL_INZONE],
# [''], # [''],
['RenewProhibited', SERVER_RENEW_PROHIBITED], ['RenewProhibited', SERVER_RENEW_PROHIBITED],

View file

@ -479,6 +479,7 @@ class Epp::Domain < Domain
user = ApiUser.find(pending_json['current_user_id']) user = ApiUser.find(pending_json['current_user_id'])
frame = Nokogiri::XML(pending_json['frame']) frame = Nokogiri::XML(pending_json['frame'])
statuses.delete(DomainStatus::PENDING_UPDATE) statuses.delete(DomainStatus::PENDING_UPDATE)
yield(self) if block_given? # need to skip statuses check here
return unless update(frame, user, false) return unless update(frame, user, false)
clean_pendings! clean_pendings!

View file

@ -3,6 +3,7 @@ module Legacy
self.table_name = :contact self.table_name = :contact
belongs_to :object_registry, foreign_key: :id belongs_to :object_registry, foreign_key: :id
belongs_to :object, foreign_key: :id belongs_to :object, foreign_key: :id
belongs_to :object_state, foreign_key: :id, primary_key: :object_id
has_one :object_state, -> { where('valid_to IS NULL') }, foreign_key: :object_id
end end
end end

View file

@ -1,5 +1,8 @@
module Legacy module Legacy
class Dnskey < Db class Dnskey < Db
self.table_name = :dnskey self.table_name = :dnskey
belongs_to :object_registry, foreign_key: :id
belongs_to :object, foreign_key: :id
end end
end end

View file

@ -2,6 +2,8 @@ module Legacy
class Nsset < Db class Nsset < Db
self.table_name = :nsset self.table_name = :nsset
belongs_to :object, foreign_key: :id
belongs_to :object_registry, foreign_key: :id
has_many :hosts, foreign_key: :nssetid has_many :hosts, foreign_key: :nssetid
end end
end end

View file

@ -1,6 +1,7 @@
module Legacy module Legacy
class Object < Db class Object < Db
self.table_name = :object self.table_name = :object
belongs_to :registrar, foreign_key: :upid, primary_key: :legacy_id, class_name: '::Registrar'
def self.instance_method_already_implemented?(method_name) def self.instance_method_already_implemented?(method_name)
return true if method_name == 'update' return true if method_name == 'update'

View file

@ -2,40 +2,39 @@ module Legacy
class ObjectState < Db class ObjectState < Db
self.table_name = :object_state self.table_name = :object_state
def name # legacy values. Just for log
# legacy values # 2 => "serverRenewProhibited",
# 2 => "serverRenewProhibited", # 5 => "serverOutzoneManual",
# 5 => "serverOutzoneManual", # 6 => "serverInzoneManual",
# 6 => "serverInzoneManual", # 7 => "serverBlocked",
# 7 => "serverBlocked", # 8 => "expirationWarning",
# 8 => "expirationWarning", # 9 => "expired",
# 9 => "expired", # 10 => "unguarded",
# 10 => "unguarded", # 11 => "validationWarning1",
# 11 => "validationWarning1", # 12 => "validationWarning2",
# 12 => "validationWarning2", # 13 => "notValidated",
# 13 => "notValidated", # 14 => "nssetMissing",
# 14 => "nssetMissing", # 15 => "outzone",
# 15 => "outzone", # 18 => "serverRegistrantChangeProhibited",
# 18 => "serverRegistrantChangeProhibited", # 19 => "deleteWarning",
# 19 => "deleteWarning", # 20 => "outzoneUnguarded",
# 20 => "outzoneUnguarded", # 1 => "serverDeleteProhibited",
# 1 => "serverDeleteProhibited", # 3 => "serverTransferProhibited",
# 3 => "serverTransferProhibited", # 4 => "serverUpdateProhibited",
# 4 => "serverUpdateProhibited", # 16 => "linked",
# 16 => "linked", # 17 => "deleteCandidate",
# 17 => "deleteCandidate", # 21 => "forceDelete"
# 21 => "forceDelete"
# new values # new values
map = { STATE_NAMES = {
2 => "serverRenewProhibited", 2 => "serverRenewProhibited",
5 => "serverHold", 5 => "serverHold",
6 => "serverManualInzone", 6 => "serverManualInzone",
7 => "serverBlocked", # 7 => "serverBlocked",
9 => "expired", 9 => "expired",
11 => "validationWarning1", # 11 => "validationWarning1",
13 => "notValidated", # 13 => "notValidated",
14 => "nssetMissing", 14 => "inactive",
15 => "serverHold", 15 => "serverHold",
18 => "serverRegistrantChangeProhibited", 18 => "serverRegistrantChangeProhibited",
1 => "serverDeleteProhibited", 1 => "serverDeleteProhibited",
@ -43,10 +42,12 @@ module Legacy
4 => "serverUpdateProhibited", 4 => "serverUpdateProhibited",
16 => "linked", 16 => "linked",
17 => "deleteCandidate", # grupistaatus 17 => "deleteCandidate", # grupistaatus
21 => "forceDelete" # grupistaatus 21 => "serverForceDelete" # grupistaatus
} }.freeze
map[state_id]
def name
STATE_NAMES[state_id]
end end
def desc def desc

View file

@ -51,10 +51,10 @@ class Registrar < ActiveRecord::Base
WHOIS_TRIGGERS = %w(name email phone street city state zip) WHOIS_TRIGGERS = %w(name email phone street city state zip)
after_save :update_whois_records after_commit :update_whois_records
def update_whois_records def update_whois_records
return true unless changed? && (changes.keys & WHOIS_TRIGGERS).present? return true unless changed? && (changes.keys & WHOIS_TRIGGERS).present?
whois_records.map(&:save) # slow currently RegenerateRegistrarWhoisesJob.enqueue id
end end
after_create :create_cash_account after_create :create_cash_account

View file

@ -1,5 +1,11 @@
class ReservedDomain < ActiveRecord::Base class ReservedDomain < ActiveRecord::Base
include Versions # version/reserved_domain_version.rb include Versions # version/reserved_domain_version.rb
before_save :fill_empty_passwords
def fill_empty_passwords
return unless names
names.each { |k, v| names[k] = SecureRandom.hex if v.blank? }
end
class << self class << self
def pw_for(domain_name) def pw_for(domain_name)

View file

@ -1,3 +1,4 @@
require "erb"
class WhoisRecord < ActiveRecord::Base class WhoisRecord < ActiveRecord::Base
belongs_to :domain belongs_to :domain
belongs_to :registrar belongs_to :registrar
@ -5,14 +6,6 @@ class WhoisRecord < ActiveRecord::Base
validates :domain, :name, :body, :json, presence: true validates :domain, :name, :body, :json, presence: true
before_validation :populate before_validation :populate
def populate
return if domain_id.blank?
self.json = generate_json
self.body = generated_body
self.name = json['name']
self.registrar_id = domain.registrar_id # for faster registrar updates
end
after_save :update_whois_server after_save :update_whois_server
class << self class << self
@ -29,6 +22,10 @@ class WhoisRecord < ActiveRecord::Base
end end
end end
def generated_json
@generated_json ||= generate_json
end
# rubocop:disable Metrics/MethodLength # rubocop:disable Metrics/MethodLength
# rubocop:disable Metrics/AbcSize # rubocop:disable Metrics/AbcSize
def generate_json def generate_json
@ -36,116 +33,74 @@ class WhoisRecord < ActiveRecord::Base
return h if domain.blank? return h if domain.blank?
status_map = { status_map = {
'ok' => 'ok (paid and in zone)' 'ok' => 'ok (paid and in zone)'
} }
@disclosed = [] @disclosed = []
h[:name] = domain.name h[:name] = domain.name
h[:registrant] = domain.registrant.name h[:status] = domain.statuses.map { |x| status_map[x] || x }
h[:status] = domain.statuses.map { |x| status_map[x] || x }.join(', ')
h[:registered] = domain.registered_at.try(:to_s, :iso8601) h[:registered] = domain.registered_at.try(:to_s, :iso8601)
h[:updated_at] = domain.updated_at.try(:to_s, :iso8601) h[:changed] = domain.updated_at.try(:to_s, :iso8601)
h[:valid_to] = domain.valid_to.try(:to_s, :iso8601) h[:expire] = domain.valid_to.try(:to_date).try(:to_s)
h[:outzone] = domain.outzone_at.try(:to_date).try(:to_s)
h[:delete] = domain.delete_at.try(:to_date).try(:to_s)
# update registar triggers when adding new attributes
h[:registrar] = domain.registrar.name h[:registrant] = domain.registrant.name
h[:registrar_phone] = domain.registrar.phone h[:registrant_email] = domain.registrant.email
h[:registrar_address] = domain.registrar.address h[:changed] = domain.registrant.updated_at.try(:to_s, :iso8601)
h[:registrar_update_at] = domain.registrar.updated_at.try(:to_s, :iso8601)
h[:admin_contacts] = [] h[:admin_contacts] = []
domain.admin_contacts.each do |ac| domain.admin_contacts.each do |ac|
@disclosed << [:email, ac.email] @disclosed << [:email, ac.email]
h[:admin_contacts] << { h[:admin_contacts] << {
name: ac.name, name: ac.name,
email: ac.email, email: ac.email,
registrar: ac.registrar.name, changed: ac.updated_at.try(:to_s, :iso8601)
created_at: ac.created_at.try(:to_s, :iso8601)
} }
end end
h[:tech_contacts] = [] h[:tech_contacts] = []
domain.tech_contacts.each do |tc| domain.tech_contacts.each do |tc|
@disclosed << [:email, tc.email] @disclosed << [:email, tc.email]
h[:tech_contacts] << { h[:tech_contacts] << {
name: tc.name, name: tc.name,
email: tc.email, email: tc.email,
registrar: tc.registrar.name, changed: tc.updated_at.try(:to_s, :iso8601)
created_at: tc.created_at.try(:to_s, :iso8601)
}
end
h[:nameservers] = []
domain.nameservers.each do |ns|
h[:nameservers] << {
hostname: ns.hostname,
updated_at: ns.updated_at.try(:to_s, :iso8601)
} }
end end
# update registar triggers when adding new attributes
h[:registrar] = domain.registrar.name
h[:registrar_url] = domain.registrar.url
h[:registrar_phone] = domain.registrar.phone
h[:registrar_address] = domain.registrar.address
h[:registrar_changed] = domain.registrar.updated_at.try(:to_s, :iso8601)
h[:nameservers] = domain.nameservers.pluck(:hostname).uniq.select(&:present?)
h[:nameservers_changed] = domain.nameservers.pluck(:updated_at).max.try(:to_s, :iso8601)
h[:dnssec_keys] = domain.dnskeys.map{|key| "#{key.flags} #{key.protocol} #{key.alg} #{key.public_key}" }
h[:dnssec_changed] = domain.dnskeys.pluck(:updated_at).max.try(:to_s, :iso8601) rescue nil
h[:disclosed] = @disclosed h[:disclosed] = @disclosed
h h
end end
def generated_body def generated_body
<<-EOS template = Rails.root.join("app/views/for_models/whois.erb".freeze)
Estonia .ee Top Level Domain WHOIS server ERB.new(template.read, nil, "-").result(binding)
Domain:
name: #{json['name']}
registrant: #{json['registrant']}
status: #{json['status']}
registered: #{Time.zone.parse(json['registered'])}
changed: #{Time.zone.parse(json['updated_at'])}
expire: #{Time.zone.parse(json['valid_to'])}
outzone:
delete:
#{contacts_body(json['admin_contacts'], json['tech_contacts'])}
Registrar:
name: #{json['registrar']}
phone: #{json['registrar_phone']}
address: #{json['registrar_address']}
changed: #{Time.zone.parse(json['registrar_update_at'])}
#{nameservers_body(json['nameservers'])}
Estonia .ee Top Level Domain WHOIS server
More information at http://internet.ee
EOS
end end
# rubocop:enable Metrics/MethodLength # rubocop:enable Metrics/MethodLength
# rubocop:enable Metrics/AbcSize # rubocop:enable Metrics/AbcSize
def contacts_body(admins, techs)
admins ||= []
techs ||= []
out = '' def populate
out << (admins.size > 1 ? "\nAdministrative contacts" : "\nAdministrative contact") return if domain_id.blank?
admins.each do |c| self.json = generated_json
out << "\n name: #{c['name']}" self.body = generated_body
out << "\n email: Not Disclosed - Visit www.internet.ee for webbased WHOIS" self.name = json['name']
out << "\n registrar: #{c['registrar']}" self.registrar_id = domain.registrar_id # for faster registrar updates
out << "\n created: #{Time.zone.parse(c['created_at'])}"
out << "\n"
end
out << (techs.size > 1 ? "\nTechnical contacts" : "\nTechnical contact:")
techs.each do |c|
out << "\n name: #{c['name']}"
out << "\n email: Not Disclosed - Visit www.internet.ee for webbased WHOIS"
out << "\n registrar: #{c['registrar']}"
out << "\n created: #{Time.zone.parse(c['created_at'])}"
out << "\n"
end
out
end
def nameservers_body(nservers)
nservers ||= []
out = "\nName servers:"
nservers.each do |ns|
out << "\n nserver: #{ns['hostname']}"
out << "\n changed: #{Time.zone.parse(ns['updated_at'])}"
out << "\n"
end
out
end end
def update_whois_server def update_whois_server

View file

@ -1,3 +1,7 @@
- content_for :actions do
= link_to('#', class: 'btn btn-default', "data-container": "body", "data-title": t('list_format_is_in_yaml'), "data-content": "domain.ee: authinfopw<br>seconddomain.ee:<br>thirddomain.ee: authinfo3<br><br>#{t('if_auth_info_is_left_empty_it_will_be_auto_generated')}<br>#{t('each_domain_name_must_end_with_colon_sign')}", "data-placement": "left", "data-toggle": "popover", "data-html" => "true") do
%span.glyphicon.glyphicon-info-sign{"aria-hidden" => "true"}
= render 'shared/title', name: t(:reserved_domains) = render 'shared/title', name: t(:reserved_domains)
= form_tag([:admin, :reserved_domains]) do |f| = form_tag([:admin, :reserved_domains]) do |f|

View file

@ -0,0 +1,60 @@
Estonia .ee Top Level Domain WHOIS server
Domain:
name: <%= json['name'] %>
<%- for st in Array(json['status']) -%>
status: <%= st %>
<%- end -%>
registered: <%= json['registered'].to_s.tr('T',' ').sub('+', ' +') %>
changed: <%= json['changed'].to_s.tr('T',' ').sub('+', ' +') %>
expire: <%= json['expire'].to_s.tr('T',' ').sub('+', ' +') %>
outzone: <%= json['outzone'].to_s.tr('T',' ').sub('+', ' +') %>
delete: <%= json['delete'].to_s.tr('T',' ').sub('+', ' +') %>
Registrant:
name: <%= json['registrant'] %>
email: Not Disclosed - Visit www.internet.ee for webbased WHOIS
changed: <%= json['changed'].to_s.tr('T',' ').sub('+', ' +') %>
<%- if json['admin_contacts'].present? -%>
Administrative contact
<%- for contact in json['admin_contacts'] -%>
name: <%= contact['name'] %>
email: Not Disclosed - Visit www.internet.ee for webbased WHOIS
changed: <%= contact['changed'].to_s.tr('T',' ').sub('+', ' +') %>
<%- end -%>
<%- end -%>
<% if json['tech_contacts'].present? %>
Technical contact:
<%- for contact in json['admin_contacts'] -%>
name: <%= contact['name'] %>
email: Not Disclosed - Visit www.internet.ee for webbased WHOIS
changed: <%= contact['changed'].to_s.tr('T',' ').sub('+', ' +') %>
<%- end -%>
<%- end -%>
Registrar:
name: <%= json['registrar'] %>
url: <%= json['registrar_url'] %>
phone: <%= json['registrar_phone'] %>
changed: <%= json['registrar_changed'].to_s.tr('T',' ').sub('+', ' +') %>
<%- if json['nameservers'].present? -%>
Name servers:
<%- for server in json['nameservers'] -%>
nserver: <%= server %>
<%- end -%>
changed: <%= json['nameservers_changed'].to_s.tr('T',' ').sub('+', ' +') %>
<%- end -%>
<%- if json['dnssec_keys'].present? -%>
DNSSEC:
<%- for key in json['dnssec_keys'] -%>
dnskey: <%= key %>
<%- end -%>
changed: <%= json['dnssec_changed'].to_s.tr('T',' ').sub('+', ' +') %>
<%- end -%>
Estonia .ee Top Level Domain WHOIS server
More information at http://internet.ee

View file

@ -1,6 +1,6 @@
<table width="600" cellspacing="0" cellpadding="0" border="0" align="center"><tbody> <table width="600" cellspacing="0" cellpadding="0" border="0" align="center"><tbody>
<tr><td> <tr><td>
<p>Eesti Interneti Sihtasutus</p> <p><img src="http://media.voog.com/0000/0037/4533/photos/eis_logo_rgb_block.png" width="150px" alt="Eesti Interneti Sihtasutus"></p>
</td></tr> </td></tr>
<tr><td> <tr><td>
<table cellspacing="0" cellpadding="0" border="0" align="center" style="text-align: justify; line-height: 16px; font-size: 12px;"><tbody> <table cellspacing="0" cellpadding="0" border="0" align="center" style="text-align: justify; line-height: 16px; font-size: 12px;"><tbody>

View file

@ -8,5 +8,6 @@
.form-group .form-group
.col-md-3.control-label .col-md-3.control-label
= f.label :legal_document, t(:legal_document) = f.label :legal_document, t(:legal_document)
%p.help-block= t(:legal_document_max_size)
.col-md-7 .col-md-7
= f.file_field :legal_document, :value => '' = f.file_field :legal_document, :value => ''

View file

@ -16,6 +16,7 @@
.col-md-3.control-label .col-md-3.control-label
- c, fr = 'required', true if params[:domain_name].blank? - c, fr = 'required', true if params[:domain_name].blank?
= label_tag 'domain[legal_document]', t(:legal_document), class: c = label_tag 'domain[legal_document]', t(:legal_document), class: c
%p.help-block= t(:legal_document_max_size)
.col-md-7 .col-md-7
= file_field_tag 'domain[legal_document]', required: fr = file_field_tag 'domain[legal_document]', required: fr
.col-md-4 .col-md-4

View file

@ -9,6 +9,7 @@
.form-group .form-group
.col-md-4.control-label .col-md-4.control-label
= label_tag 'domain[legal_document]', t(:legal_document), class: 'required' = label_tag 'domain[legal_document]', t(:legal_document), class: 'required'
%p.help-block= t(:legal_document_max_size)
.col-md-6 .col-md-6
= file_field_tag 'domain[legal_document]', required: true = file_field_tag 'domain[legal_document]', required: true
= hidden_field_tag 'domain[name]', params[:domain_name] = hidden_field_tag 'domain[name]', params[:domain_name]

View file

@ -18,9 +18,8 @@
.col-md-3.control-label .col-md-3.control-label
= label_tag "domain_contacts_attributes_#{k}_code", t(:id), class: 'required' = label_tag "domain_contacts_attributes_#{k}_code", t(:id), class: 'required'
.col-md-7.has-feedback .col-md-7.has-feedback
= select_tag "domain[contacts_attributes][#{k}][code]", = text_field_tag "domain[contacts_attributes][#{k}][code]", v['code'], class: "hidden"
options_for_select(@contacts_autocomplete_map, selected: v['code']), = text_field_tag "domain[contacts_attributes][#{k}][code_helper]", contacts.find_by(code: v['code']).try(:search_name), class: 'form-control', data: {autocomplete: search_contacts_registrar_domains_path}, required: true
include_blank: true, class: 'js-combobox js-contact-code', required: true
:coffee :coffee
clone = $('.js-contact:first').clone() clone = $('.js-contact:first').clone()
@ -39,4 +38,5 @@
# remove link for temp # remove link for temp
item.find('a.add-domain-contact').each (k, v) -> item.find('a.add-domain-contact').each (k, v) ->
$(v).hide() $(v).hide()
new Autocomplete()
$clone: clone $clone: clone

View file

@ -20,9 +20,9 @@
.col-md-3.control-label .col-md-3.control-label
= label_tag :domain_registrant, t(:registrant), class: 'required' = label_tag :domain_registrant, t(:registrant), class: 'required'
.col-md-7 .col-md-7
= select_tag "domain[registrant]", = text_field_tag 'domain[registrant]', @domain_params[:registrant], class: "hidden"
options_for_select(@contacts_autocomplete_map, selected: @domain_params[:registrant]), = text_field_tag 'domain[registrant_helper]', contacts.find_by(code: @domain_params[:registrant]).try(:search_name),
include_blank: true, class: 'js-combobox', required: true class: 'form-control', data: {autocomplete: search_contacts_registrar_domains_path}, required: true
- unless params[:domain_name] - unless params[:domain_name]
.form-group .form-group

View file

@ -21,7 +21,7 @@
</create> </create>
<extension> <extension>
<eis:extdata xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd"> <eis:extdata xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd">
<eis:ident type="bic" cc="EE">123</eis:ident> <eis:ident type="org" cc="EE">123</eis:ident>
<eis:legalDocument type="pdf"> <eis:legalDocument type="pdf">
dGVzdCBmYWlsCg== dGVzdCBmYWlsCg==
</eis:legalDocument> </eis:legalDocument>

View file

@ -0,0 +1,5 @@
class Array
def include_any? *args
(self & args).any?
end
end

View file

@ -633,6 +633,7 @@ en:
expiry_absolute: 'Expiry absolute' expiry_absolute: 'Expiry absolute'
upload_key: 'Upload key' upload_key: 'Upload key'
legal_document: 'Legal document' legal_document: 'Legal document'
legal_document_max_size: '(max. 8MB)'
delete_domain: 'Delete domain' delete_domain: 'Delete domain'
index: 'Index' index: 'Index'
ident: 'Ident' ident: 'Ident'
@ -921,3 +922,6 @@ en:
force_delete_subject: 'Kustutusmenetluse teade' force_delete_subject: 'Kustutusmenetluse teade'
welcome_to_eis_registrar_portal: 'Welcome to EIS Registrar portal' welcome_to_eis_registrar_portal: 'Welcome to EIS Registrar portal'
interfaces: 'Interfaces' interfaces: 'Interfaces'
list_format_is_in_yaml: 'List format is in YAML'
if_auth_info_is_left_empty_it_will_be_auto_generated: 'If auth info is left empty, it will be auto generated.'
each_domain_name_must_end_with_colon_sign: 'Each domain name must end with colon (:) sign.'

View file

@ -56,6 +56,7 @@ Rails.application.routes.draw do
get 'info' get 'info'
get 'check' get 'check'
get 'delete' get 'delete'
get 'search_contacts'
end end
end end

View file

@ -0,0 +1,5 @@
class AddUpdatedAtToDnskey < ActiveRecord::Migration
def change
add_column :dnskeys, :updated_at, :datetime
end
end

View file

@ -11,7 +11,7 @@
# #
# It's strongly recommended that you check this file into your version control system. # It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20150921111842) do ActiveRecord::Schema.define(version: 20151028183132) do
# These are extensions that must be enabled in order to support this database # These are extensions that must be enabled in order to support this database
enable_extension "plpgsql" enable_extension "plpgsql"
@ -240,19 +240,20 @@ ActiveRecord::Schema.define(version: 20150921111842) do
end end
create_table "dnskeys", force: :cascade do |t| create_table "dnskeys", force: :cascade do |t|
t.integer "domain_id" t.integer "domain_id"
t.integer "flags" t.integer "flags"
t.integer "protocol" t.integer "protocol"
t.integer "alg" t.integer "alg"
t.text "public_key" t.text "public_key"
t.integer "delegation_signer_id" t.integer "delegation_signer_id"
t.string "ds_key_tag" t.string "ds_key_tag"
t.integer "ds_alg" t.integer "ds_alg"
t.integer "ds_digest_type" t.integer "ds_digest_type"
t.string "ds_digest" t.string "ds_digest"
t.string "creator_str" t.string "creator_str"
t.string "updator_str" t.string "updator_str"
t.integer "legacy_domain_id" t.integer "legacy_domain_id"
t.datetime "updated_at"
end end
add_index "dnskeys", ["delegation_signer_id"], name: "index_dnskeys_on_delegation_signer_id", using: :btree add_index "dnskeys", ["delegation_signer_id"], name: "index_dnskeys_on_delegation_signer_id", using: :btree
@ -451,15 +452,28 @@ ActiveRecord::Schema.define(version: 20150921111842) do
add_index "legal_documents", ["documentable_type", "documentable_id"], name: "index_legal_documents_on_documentable_type_and_documentable_id", using: :btree add_index "legal_documents", ["documentable_type", "documentable_id"], name: "index_legal_documents_on_documentable_type_and_documentable_id", using: :btree
create_table "log_account_activities", force: :cascade do |t| create_table "log_account_activities", force: :cascade do |t|
t.string "item_type", null: false t.string "item_type", null: false
t.integer "item_id", null: false t.integer "item_id", null: false
t.string "event", null: false t.string "event", null: false
t.string "whodunnit" t.string "whodunnit"
t.json "object" t.json "object"
t.json "object_changes" t.json "object_changes"
t.datetime "created_at" t.datetime "created_at"
t.string "session" t.string "session"
t.json "children" t.json "children"
t.integer "log_id"
t.integer "account_id"
t.integer "invoice_id"
t.decimal "sum"
t.string "currency"
t.integer "bank_transaction_id"
t.datetime "log_created_at"
t.datetime "log_updated_at"
t.string "description"
t.string "creator_str"
t.string "updator_str"
t.string "activity_type"
t.integer "log_pricelist_id"
end end
add_index "log_account_activities", ["item_type", "item_id"], name: "index_log_account_activities_on_item_type_and_item_id", using: :btree add_index "log_account_activities", ["item_type", "item_id"], name: "index_log_account_activities_on_item_type_and_item_id", using: :btree
@ -475,21 +489,44 @@ ActiveRecord::Schema.define(version: 20150921111842) do
t.datetime "created_at" t.datetime "created_at"
t.string "session" t.string "session"
t.json "children" t.json "children"
t.integer "log_id"
t.integer "registrar_id"
t.string "account_type"
t.decimal "balance"
t.datetime "log_created_at"
t.datetime "log_updated_at"
t.string "currency"
t.string "creator_str"
t.string "updator_str"
end end
add_index "log_accounts", ["item_type", "item_id"], name: "index_log_accounts_on_item_type_and_item_id", using: :btree add_index "log_accounts", ["item_type", "item_id"], name: "index_log_accounts_on_item_type_and_item_id", using: :btree
add_index "log_accounts", ["whodunnit"], name: "index_log_accounts_on_whodunnit", using: :btree add_index "log_accounts", ["whodunnit"], name: "index_log_accounts_on_whodunnit", using: :btree
create_table "log_addresses", force: :cascade do |t| create_table "log_addresses", force: :cascade do |t|
t.string "item_type", null: false t.string "item_type", null: false
t.integer "item_id", null: false t.integer "item_id", null: false
t.string "event", null: false t.string "event", null: false
t.string "whodunnit" t.string "whodunnit"
t.json "object" t.json "object"
t.json "object_changes" t.json "object_changes"
t.datetime "created_at" t.datetime "created_at"
t.string "session" t.string "session"
t.json "children" t.json "children"
t.integer "log_id"
t.integer "contact_id"
t.string "city"
t.string "street"
t.string "zip"
t.datetime "log_created_at"
t.datetime "log_updated_at"
t.string "street2"
t.string "street3"
t.string "creator_str"
t.string "updator_str"
t.string "country_code"
t.string "state"
t.integer "legacy_contact_id"
end end
add_index "log_addresses", ["item_type", "item_id"], name: "index_log_addresses_on_item_type_and_item_id", using: :btree add_index "log_addresses", ["item_type", "item_id"], name: "index_log_addresses_on_item_type_and_item_id", using: :btree
@ -511,30 +548,56 @@ ActiveRecord::Schema.define(version: 20150921111842) do
add_index "log_api_users", ["whodunnit"], name: "index_log_api_users_on_whodunnit", using: :btree add_index "log_api_users", ["whodunnit"], name: "index_log_api_users_on_whodunnit", using: :btree
create_table "log_bank_statements", force: :cascade do |t| create_table "log_bank_statements", force: :cascade do |t|
t.string "item_type", null: false t.string "item_type", null: false
t.integer "item_id", null: false t.integer "item_id", null: false
t.string "event", null: false t.string "event", null: false
t.string "whodunnit" t.string "whodunnit"
t.json "object" t.json "object"
t.json "object_changes" t.json "object_changes"
t.datetime "created_at" t.datetime "created_at"
t.string "session" t.string "session"
t.json "children" t.json "children"
t.integer "log_id"
t.string "bank_code"
t.string "iban"
t.string "import_file_path"
t.datetime "queried_at"
t.datetime "log_created_at"
t.datetime "log_updated_at"
t.string "creator_str"
t.string "updator_str"
end end
add_index "log_bank_statements", ["item_type", "item_id"], name: "index_log_bank_statements_on_item_type_and_item_id", using: :btree add_index "log_bank_statements", ["item_type", "item_id"], name: "index_log_bank_statements_on_item_type_and_item_id", using: :btree
add_index "log_bank_statements", ["whodunnit"], name: "index_log_bank_statements_on_whodunnit", using: :btree add_index "log_bank_statements", ["whodunnit"], name: "index_log_bank_statements_on_whodunnit", using: :btree
create_table "log_bank_transactions", force: :cascade do |t| create_table "log_bank_transactions", force: :cascade do |t|
t.string "item_type", null: false t.string "item_type", null: false
t.integer "item_id", null: false t.integer "item_id", null: false
t.string "event", null: false t.string "event", null: false
t.string "whodunnit" t.string "whodunnit"
t.json "object" t.json "object"
t.json "object_changes" t.json "object_changes"
t.datetime "created_at" t.datetime "created_at"
t.string "session" t.string "session"
t.json "children" t.json "children"
t.integer "log_id"
t.integer "bank_statement_id"
t.string "bank_reference"
t.string "iban"
t.string "currency"
t.string "buyer_bank_code"
t.string "buyer_iban"
t.string "buyer_name"
t.string "document_no"
t.string "description"
t.decimal "sum"
t.string "reference_no"
t.datetime "paid_at"
t.datetime "log_created_at"
t.datetime "log_updated_at"
t.string "creator_str"
t.string "updator_str"
end end
add_index "log_bank_transactions", ["item_type", "item_id"], name: "index_log_bank_transactions_on_item_type_and_item_id", using: :btree add_index "log_bank_transactions", ["item_type", "item_id"], name: "index_log_bank_transactions_on_item_type_and_item_id", using: :btree
@ -550,6 +613,12 @@ ActiveRecord::Schema.define(version: 20150921111842) do
t.datetime "created_at" t.datetime "created_at"
t.string "session" t.string "session"
t.json "children" t.json "children"
t.integer "log_id"
t.string "names", array: true
t.datetime "log_created_at"
t.datetime "log_updated_at"
t.string "creator_str"
t.string "updator_str"
end end
add_index "log_blocked_domains", ["item_type", "item_id"], name: "index_log_blocked_domains_on_item_type_and_item_id", using: :btree add_index "log_blocked_domains", ["item_type", "item_id"], name: "index_log_blocked_domains_on_item_type_and_item_id", using: :btree
@ -565,6 +634,17 @@ ActiveRecord::Schema.define(version: 20150921111842) do
t.datetime "created_at" t.datetime "created_at"
t.string "session" t.string "session"
t.json "children" t.json "children"
t.integer "log_id"
t.integer "api_user_id"
t.text "csr"
t.text "crt"
t.string "creator_str"
t.string "updator_str"
t.datetime "log_created_at"
t.datetime "log_updated_at"
t.string "common_name"
t.string "md5"
t.string "interface"
end end
add_index "log_certificates", ["item_type", "item_id"], name: "index_log_certificates_on_item_type_and_item_id", using: :btree add_index "log_certificates", ["item_type", "item_id"], name: "index_log_certificates_on_item_type_and_item_id", using: :btree
@ -586,15 +666,41 @@ ActiveRecord::Schema.define(version: 20150921111842) do
add_index "log_contact_statuses", ["whodunnit"], name: "index_log_contact_statuses_on_whodunnit", using: :btree add_index "log_contact_statuses", ["whodunnit"], name: "index_log_contact_statuses_on_whodunnit", using: :btree
create_table "log_contacts", force: :cascade do |t| create_table "log_contacts", force: :cascade do |t|
t.string "item_type", null: false t.string "item_type", null: false
t.integer "item_id", null: false t.integer "item_id", null: false
t.string "event", null: false t.string "event", null: false
t.string "whodunnit" t.string "whodunnit"
t.json "object" t.json "object"
t.json "object_changes" t.json "object_changes"
t.datetime "created_at" t.datetime "created_at"
t.string "session" t.string "session"
t.json "children" t.json "children"
t.integer "log_id"
t.string "code"
t.string "phone"
t.string "email"
t.string "fax"
t.datetime "log_created_at"
t.datetime "log_updated_at"
t.string "ident"
t.string "ident_type"
t.string "auth_info"
t.string "name"
t.string "org_name"
t.integer "registrar_id"
t.string "creator_str"
t.string "updator_str"
t.string "ident_country_code"
t.string "city"
t.text "street"
t.string "zip"
t.string "country_code"
t.string "state"
t.integer "legacy_id"
t.string "statuses", array: true
t.hstore "status_notes"
t.integer "legacy_history_id"
t.integer "copy_from_id"
t.datetime "ident_updated_at" t.datetime "ident_updated_at"
end end
@ -617,78 +723,153 @@ ActiveRecord::Schema.define(version: 20150921111842) do
add_index "log_countries", ["whodunnit"], name: "index_log_countries_on_whodunnit", using: :btree add_index "log_countries", ["whodunnit"], name: "index_log_countries_on_whodunnit", using: :btree
create_table "log_dnskeys", force: :cascade do |t| create_table "log_dnskeys", force: :cascade do |t|
t.string "item_type", null: false t.string "item_type", null: false
t.integer "item_id", null: false t.integer "item_id", null: false
t.string "event", null: false t.string "event", null: false
t.string "whodunnit" t.string "whodunnit"
t.json "object" t.json "object"
t.json "object_changes" t.json "object_changes"
t.datetime "created_at" t.datetime "created_at"
t.string "session" t.string "session"
t.json "children" t.json "children"
t.integer "log_id"
t.integer "domain_id"
t.integer "flags"
t.integer "protocol"
t.integer "alg"
t.text "public_key"
t.integer "delegation_signer_id"
t.string "ds_key_tag"
t.integer "ds_alg"
t.integer "ds_digest_type"
t.string "ds_digest"
t.string "creator_str"
t.string "updator_str"
t.integer "legacy_domain_id"
end end
add_index "log_dnskeys", ["item_type", "item_id"], name: "index_log_dnskeys_on_item_type_and_item_id", using: :btree add_index "log_dnskeys", ["item_type", "item_id"], name: "index_log_dnskeys_on_item_type_and_item_id", using: :btree
add_index "log_dnskeys", ["whodunnit"], name: "index_log_dnskeys_on_whodunnit", using: :btree add_index "log_dnskeys", ["whodunnit"], name: "index_log_dnskeys_on_whodunnit", using: :btree
create_table "log_domain_contacts", force: :cascade do |t| create_table "log_domain_contacts", force: :cascade do |t|
t.string "item_type", null: false t.string "item_type", null: false
t.integer "item_id", null: false t.integer "item_id", null: false
t.string "event", null: false t.string "event", null: false
t.string "whodunnit" t.string "whodunnit"
t.json "object" t.json "object"
t.json "object_changes" t.json "object_changes"
t.datetime "created_at" t.datetime "created_at"
t.string "session" t.string "session"
t.json "children" t.json "children"
t.integer "log_id"
t.integer "contact_id"
t.integer "domain_id"
t.string "contact_type"
t.datetime "log_created_at"
t.datetime "log_updated_at"
t.string "contact_code_cache"
t.string "creator_str"
t.string "updator_str"
t.string "type"
t.integer "legacy_domain_id"
t.integer "legacy_contact_id"
end end
add_index "log_domain_contacts", ["item_type", "item_id"], name: "index_log_domain_contacts_on_item_type_and_item_id", using: :btree add_index "log_domain_contacts", ["item_type", "item_id"], name: "index_log_domain_contacts_on_item_type_and_item_id", using: :btree
add_index "log_domain_contacts", ["whodunnit"], name: "index_log_domain_contacts_on_whodunnit", using: :btree add_index "log_domain_contacts", ["whodunnit"], name: "index_log_domain_contacts_on_whodunnit", using: :btree
create_table "log_domain_statuses", force: :cascade do |t| create_table "log_domain_statuses", force: :cascade do |t|
t.string "item_type", null: false t.string "item_type", null: false
t.integer "item_id", null: false t.integer "item_id", null: false
t.string "event", null: false t.string "event", null: false
t.string "whodunnit" t.string "whodunnit"
t.json "object" t.json "object"
t.json "object_changes" t.json "object_changes"
t.datetime "created_at" t.datetime "created_at"
t.string "session" t.string "session"
t.json "children" t.json "children"
t.integer "log_id"
t.integer "domain_id"
t.string "description"
t.string "value"
t.string "creator_str"
t.string "updator_str"
t.integer "legacy_domain_id"
end end
add_index "log_domain_statuses", ["item_type", "item_id"], name: "index_log_domain_statuses_on_item_type_and_item_id", using: :btree add_index "log_domain_statuses", ["item_type", "item_id"], name: "index_log_domain_statuses_on_item_type_and_item_id", using: :btree
add_index "log_domain_statuses", ["whodunnit"], name: "index_log_domain_statuses_on_whodunnit", using: :btree add_index "log_domain_statuses", ["whodunnit"], name: "index_log_domain_statuses_on_whodunnit", using: :btree
create_table "log_domain_transfers", force: :cascade do |t| create_table "log_domain_transfers", force: :cascade do |t|
t.string "item_type", null: false t.string "item_type", null: false
t.integer "item_id", null: false t.integer "item_id", null: false
t.string "event", null: false t.string "event", null: false
t.string "whodunnit" t.string "whodunnit"
t.json "object" t.json "object"
t.json "object_changes" t.json "object_changes"
t.datetime "created_at" t.datetime "created_at"
t.string "session" t.string "session"
t.json "children" t.json "children"
t.integer "log_id"
t.integer "domain_id"
t.string "status"
t.datetime "transfer_requested_at"
t.datetime "transferred_at"
t.integer "transfer_from_id"
t.integer "transfer_to_id"
t.datetime "log_created_at"
t.datetime "log_updated_at"
t.datetime "wait_until"
t.string "creator_str"
t.string "updator_str"
end end
add_index "log_domain_transfers", ["item_type", "item_id"], name: "index_log_domain_transfers_on_item_type_and_item_id", using: :btree add_index "log_domain_transfers", ["item_type", "item_id"], name: "index_log_domain_transfers_on_item_type_and_item_id", using: :btree
add_index "log_domain_transfers", ["whodunnit"], name: "index_log_domain_transfers_on_whodunnit", using: :btree add_index "log_domain_transfers", ["whodunnit"], name: "index_log_domain_transfers_on_whodunnit", using: :btree
create_table "log_domains", force: :cascade do |t| create_table "log_domains", force: :cascade do |t|
t.string "item_type", null: false t.string "item_type", null: false
t.integer "item_id", null: false t.integer "item_id", null: false
t.string "event", null: false t.string "event", null: false
t.string "whodunnit" t.string "whodunnit"
t.json "object" t.json "object"
t.json "object_changes" t.json "object_changes"
t.datetime "created_at" t.datetime "created_at"
t.text "nameserver_ids", default: [], array: true t.text "nameserver_ids", default: [], array: true
t.text "tech_contact_ids", default: [], array: true t.text "tech_contact_ids", default: [], array: true
t.text "admin_contact_ids", default: [], array: true t.text "admin_contact_ids", default: [], array: true
t.string "session" t.string "session"
t.json "children" t.json "children"
t.integer "log_id"
t.string "name"
t.integer "registrar_id"
t.datetime "registered_at"
t.string "status"
t.datetime "valid_from"
t.datetime "valid_to"
t.integer "registrant_id"
t.string "auth_info"
t.datetime "log_created_at"
t.datetime "log_updated_at"
t.string "name_dirty"
t.string "name_puny"
t.integer "period"
t.string "period_unit"
t.string "creator_str"
t.string "updator_str"
t.integer "legacy_id"
t.integer "legacy_registrar_id"
t.integer "legacy_registrant_id"
t.datetime "outzone_at"
t.datetime "delete_at"
t.datetime "registrant_verification_asked_at"
t.string "registrant_verification_token"
t.json "pending_json"
t.datetime "force_delete_at"
t.string "statuses", array: true
t.boolean "reserved"
t.hstore "status_notes"
t.string "statuses_backup", array: true
end end
add_index "log_domains", ["item_type", "item_id"], name: "index_log_domains_on_item_type_and_item_id", using: :btree add_index "log_domains", ["item_type", "item_id"], name: "index_log_domains_on_item_type_and_item_id", using: :btree
@ -704,57 +885,135 @@ ActiveRecord::Schema.define(version: 20150921111842) do
t.datetime "created_at" t.datetime "created_at"
t.string "session" t.string "session"
t.json "children" t.json "children"
t.integer "log_id"
t.integer "invoice_id"
t.string "description"
t.string "unit"
t.integer "amount"
t.decimal "price"
t.datetime "log_created_at"
t.datetime "log_updated_at"
t.string "creator_str"
t.string "updator_str"
end end
add_index "log_invoice_items", ["item_type", "item_id"], name: "index_log_invoice_items_on_item_type_and_item_id", using: :btree add_index "log_invoice_items", ["item_type", "item_id"], name: "index_log_invoice_items_on_item_type_and_item_id", using: :btree
add_index "log_invoice_items", ["whodunnit"], name: "index_log_invoice_items_on_whodunnit", using: :btree add_index "log_invoice_items", ["whodunnit"], name: "index_log_invoice_items_on_whodunnit", using: :btree
create_table "log_invoices", force: :cascade do |t| create_table "log_invoices", force: :cascade do |t|
t.string "item_type", null: false t.string "item_type", null: false
t.integer "item_id", null: false t.integer "item_id", null: false
t.string "event", null: false t.string "event", null: false
t.string "whodunnit" t.string "whodunnit"
t.json "object" t.json "object"
t.json "object_changes" t.json "object_changes"
t.datetime "created_at" t.datetime "created_at"
t.string "session" t.string "session"
t.json "children" t.json "children"
t.integer "log_id"
t.datetime "log_created_at"
t.datetime "log_updated_at"
t.string "invoice_type"
t.datetime "due_date"
t.string "payment_term"
t.string "currency"
t.string "description"
t.string "reference_no"
t.decimal "vat_prc"
t.datetime "paid_at"
t.integer "seller_id"
t.string "seller_name"
t.string "seller_reg_no"
t.string "seller_iban"
t.string "seller_bank"
t.string "seller_swift"
t.string "seller_vat_no"
t.string "seller_country_code"
t.string "seller_state"
t.string "seller_street"
t.string "seller_city"
t.string "seller_zip"
t.string "seller_phone"
t.string "seller_url"
t.string "seller_email"
t.string "seller_contact_name"
t.integer "buyer_id"
t.string "buyer_name"
t.string "buyer_reg_no"
t.string "buyer_country_code"
t.string "buyer_state"
t.string "buyer_street"
t.string "buyer_city"
t.string "buyer_zip"
t.string "buyer_phone"
t.string "buyer_url"
t.string "buyer_email"
t.string "creator_str"
t.string "updator_str"
t.integer "number"
t.datetime "cancelled_at"
t.decimal "sum_cache"
end end
add_index "log_invoices", ["item_type", "item_id"], name: "index_log_invoices_on_item_type_and_item_id", using: :btree add_index "log_invoices", ["item_type", "item_id"], name: "index_log_invoices_on_item_type_and_item_id", using: :btree
add_index "log_invoices", ["whodunnit"], name: "index_log_invoices_on_whodunnit", using: :btree add_index "log_invoices", ["whodunnit"], name: "index_log_invoices_on_whodunnit", using: :btree
create_table "log_keyrelays", force: :cascade do |t| create_table "log_keyrelays", force: :cascade do |t|
t.string "item_type", null: false t.string "item_type", null: false
t.integer "item_id", null: false t.integer "item_id", null: false
t.string "event", null: false t.string "event", null: false
t.string "whodunnit" t.string "whodunnit"
t.json "object" t.json "object"
t.json "object_changes" t.json "object_changes"
t.datetime "created_at" t.datetime "created_at"
t.string "session" t.string "session"
t.json "children" t.json "children"
t.integer "log_id"
t.integer "domain_id"
t.datetime "pa_date"
t.string "key_data_flags"
t.string "key_data_protocol"
t.string "key_data_alg"
t.text "key_data_public_key"
t.string "auth_info_pw"
t.string "expiry_relative"
t.datetime "expiry_absolute"
t.integer "requester_id"
t.integer "accepter_id"
t.datetime "log_created_at"
t.datetime "log_updated_at"
t.string "creator_str"
t.string "updator_str"
end end
add_index "log_keyrelays", ["item_type", "item_id"], name: "index_log_keyrelays_on_item_type_and_item_id", using: :btree add_index "log_keyrelays", ["item_type", "item_id"], name: "index_log_keyrelays_on_item_type_and_item_id", using: :btree
add_index "log_keyrelays", ["whodunnit"], name: "index_log_keyrelays_on_whodunnit", using: :btree add_index "log_keyrelays", ["whodunnit"], name: "index_log_keyrelays_on_whodunnit", using: :btree
create_table "log_legal_documents", force: :cascade do |t| create_table "log_legal_documents", force: :cascade do |t|
t.string "item_type", null: false t.string "item_type", null: false
t.integer "item_id", null: false t.integer "item_id", null: false
t.string "event", null: false t.string "event", null: false
t.string "whodunnit" t.string "whodunnit"
t.json "object" t.json "object"
t.json "object_changes" t.json "object_changes"
t.datetime "created_at" t.datetime "created_at"
t.string "session" t.string "session"
t.json "children" t.json "children"
t.integer "log_id"
t.string "document_type"
t.integer "documentable_id"
t.string "documentable_type"
t.datetime "log_created_at"
t.datetime "log_updated_at"
t.string "creator_str"
t.string "updator_str"
t.string "path"
end end
add_index "log_legal_documents", ["item_type", "item_id"], name: "index_log_legal_documents_on_item_type_and_item_id", using: :btree add_index "log_legal_documents", ["item_type", "item_id"], name: "index_log_legal_documents_on_item_type_and_item_id", using: :btree
add_index "log_legal_documents", ["whodunnit"], name: "index_log_legal_documents_on_whodunnit", using: :btree add_index "log_legal_documents", ["whodunnit"], name: "index_log_legal_documents_on_whodunnit", using: :btree
create_table "log_messages", force: :cascade do |t| create_table "log_mail_templates", force: :cascade do |t|
t.string "item_type", null: false t.string "item_type", null: false
t.integer "item_id", null: false t.integer "item_id", null: false
t.string "event", null: false t.string "event", null: false
@ -764,47 +1023,151 @@ ActiveRecord::Schema.define(version: 20150921111842) do
t.datetime "created_at" t.datetime "created_at"
t.string "session" t.string "session"
t.json "children" t.json "children"
t.integer "log_id"
t.string "name"
t.string "subject"
t.string "from"
t.string "bcc"
t.string "cc"
t.text "body"
t.text "text_body"
t.datetime "log_created_at"
t.datetime "log_updated_at"
end
add_index "log_mail_templates", ["item_type", "item_id"], name: "index_log_mail_templates_on_item_type_and_item_id", using: :btree
add_index "log_mail_templates", ["whodunnit"], name: "index_log_mail_templates_on_whodunnit", using: :btree
create_table "log_messages", force: :cascade do |t|
t.string "item_type", null: false
t.integer "item_id", null: false
t.string "event", null: false
t.string "whodunnit"
t.json "object"
t.json "object_changes"
t.datetime "created_at"
t.string "session"
t.json "children"
t.integer "log_id"
t.integer "registrar_id"
t.string "body"
t.string "attached_obj_type"
t.string "attached_obj_id"
t.boolean "queued"
t.datetime "log_created_at"
t.datetime "log_updated_at"
t.string "creator_str"
t.string "updator_str"
end end
add_index "log_messages", ["item_type", "item_id"], name: "index_log_messages_on_item_type_and_item_id", using: :btree add_index "log_messages", ["item_type", "item_id"], name: "index_log_messages_on_item_type_and_item_id", using: :btree
add_index "log_messages", ["whodunnit"], name: "index_log_messages_on_whodunnit", using: :btree add_index "log_messages", ["whodunnit"], name: "index_log_messages_on_whodunnit", using: :btree
create_table "log_nameservers", force: :cascade do |t| create_table "log_nameservers", force: :cascade do |t|
t.string "item_type", null: false t.string "item_type", null: false
t.integer "item_id", null: false t.integer "item_id", null: false
t.string "event", null: false t.string "event", null: false
t.string "whodunnit" t.string "whodunnit"
t.json "object" t.json "object"
t.json "object_changes" t.json "object_changes"
t.datetime "created_at" t.datetime "created_at"
t.string "session" t.string "session"
t.json "children" t.json "children"
t.integer "log_id"
t.string "hostname"
t.string "ipv4"
t.datetime "log_created_at"
t.datetime "log_updated_at"
t.string "ipv6"
t.integer "domain_id"
t.string "creator_str"
t.string "updator_str"
t.integer "legacy_domain_id"
end end
add_index "log_nameservers", ["item_type", "item_id"], name: "index_log_nameservers_on_item_type_and_item_id", using: :btree add_index "log_nameservers", ["item_type", "item_id"], name: "index_log_nameservers_on_item_type_and_item_id", using: :btree
add_index "log_nameservers", ["whodunnit"], name: "index_log_nameservers_on_whodunnit", using: :btree add_index "log_nameservers", ["whodunnit"], name: "index_log_nameservers_on_whodunnit", using: :btree
create_table "log_pricelists", force: :cascade do |t| create_table "log_pricelists", force: :cascade do |t|
t.string "item_type", null: false t.string "item_type", null: false
t.integer "item_id", null: false t.integer "item_id", null: false
t.string "event", null: false t.string "event", null: false
t.string "whodunnit" t.string "whodunnit"
t.json "object" t.json "object"
t.json "object_changes" t.json "object_changes"
t.datetime "created_at" t.datetime "created_at"
t.string "session" t.string "session"
t.integer "log_id"
t.string "desc"
t.string "category"
t.decimal "price_cents"
t.string "price_currency"
t.datetime "valid_from"
t.datetime "valid_to"
t.string "creator_str"
t.string "updator_str"
t.datetime "log_created_at"
t.datetime "log_updated_at"
t.string "duration"
t.string "operation_category"
end end
create_table "log_registrars", force: :cascade do |t| create_table "log_registrant_verifications", force: :cascade do |t|
t.string "item_type", null: false t.string "item_type", null: false
t.integer "item_id", null: false t.integer "item_id", null: false
t.string "event", null: false t.string "event", null: false
t.string "whodunnit" t.string "whodunnit"
t.json "object" t.json "object"
t.json "object_changes" t.json "object_changes"
t.datetime "created_at" t.datetime "created_at"
t.string "session" t.string "session"
t.json "children" t.json "children"
t.integer "log_id"
t.string "domain_name"
t.string "verification_token"
t.datetime "log_created_at"
t.datetime "log_updated_at"
t.string "action"
t.integer "domain_id"
t.string "action_type"
end
add_index "log_registrant_verifications", ["item_type", "item_id"], name: "index_log_registrant_verifications_on_item_type_and_item_id", using: :btree
add_index "log_registrant_verifications", ["whodunnit"], name: "index_log_registrant_verifications_on_whodunnit", using: :btree
create_table "log_registrars", force: :cascade do |t|
t.string "item_type", null: false
t.integer "item_id", null: false
t.string "event", null: false
t.string "whodunnit"
t.json "object"
t.json "object_changes"
t.datetime "created_at"
t.string "session"
t.json "children"
t.integer "log_id"
t.string "name"
t.string "reg_no"
t.string "vat_no"
t.string "billing_address"
t.datetime "log_created_at"
t.datetime "log_updated_at"
t.string "creator_str"
t.string "updator_str"
t.string "phone"
t.string "email"
t.string "billing_email"
t.string "country_code"
t.string "state"
t.string "city"
t.string "street"
t.string "zip"
t.string "code"
t.string "url"
t.string "directo_handle"
t.boolean "vat"
t.integer "legacy_id"
t.string "reference_no"
end end
add_index "log_registrars", ["item_type", "item_id"], name: "index_log_registrars_on_item_type_and_item_id", using: :btree add_index "log_registrars", ["item_type", "item_id"], name: "index_log_registrars_on_item_type_and_item_id", using: :btree
@ -820,6 +1183,12 @@ ActiveRecord::Schema.define(version: 20150921111842) do
t.datetime "created_at" t.datetime "created_at"
t.string "session" t.string "session"
t.json "children" t.json "children"
t.integer "log_id"
t.datetime "log_created_at"
t.datetime "log_updated_at"
t.string "creator_str"
t.string "updator_str"
t.hstore "names"
end end
add_index "log_reserved_domains", ["item_type", "item_id"], name: "index_log_reserved_domains_on_item_type_and_item_id", using: :btree add_index "log_reserved_domains", ["item_type", "item_id"], name: "index_log_reserved_domains_on_item_type_and_item_id", using: :btree
@ -835,21 +1204,56 @@ ActiveRecord::Schema.define(version: 20150921111842) do
t.datetime "created_at" t.datetime "created_at"
t.string "session" t.string "session"
t.json "children" t.json "children"
t.integer "log_id"
t.string "var"
t.text "value"
t.integer "thing_id"
t.string "thing_type"
t.datetime "log_created_at"
t.datetime "log_updated_at"
t.string "creator_str"
t.string "updator_str"
end end
add_index "log_settings", ["item_type", "item_id"], name: "index_log_settings_on_item_type_and_item_id", using: :btree add_index "log_settings", ["item_type", "item_id"], name: "index_log_settings_on_item_type_and_item_id", using: :btree
add_index "log_settings", ["whodunnit"], name: "index_log_settings_on_whodunnit", using: :btree add_index "log_settings", ["whodunnit"], name: "index_log_settings_on_whodunnit", using: :btree
create_table "log_users", force: :cascade do |t| create_table "log_users", force: :cascade do |t|
t.string "item_type", null: false t.string "item_type", null: false
t.integer "item_id", null: false t.integer "item_id", null: false
t.string "event", null: false t.string "event", null: false
t.string "whodunnit" t.string "whodunnit"
t.json "object" t.json "object"
t.json "object_changes" t.json "object_changes"
t.datetime "created_at" t.datetime "created_at"
t.string "session" t.string "session"
t.json "children" t.json "children"
t.integer "log_id"
t.string "username"
t.string "password"
t.datetime "log_created_at"
t.datetime "log_updated_at"
t.string "email"
t.integer "sign_in_count"
t.datetime "current_sign_in_at"
t.datetime "last_sign_in_at"
t.inet "current_sign_in_ip"
t.inet "last_sign_in_ip"
t.string "identity_code"
t.string "roles", array: true
t.string "creator_str"
t.string "updator_str"
t.string "country_code"
t.integer "registrar_id"
t.boolean "active"
t.text "csr"
t.text "crt"
t.string "type"
t.string "registrant_ident"
t.string "encrypted_password"
t.datetime "remember_created_at"
t.integer "failed_attempts"
t.datetime "locked_at"
end end
add_index "log_users", ["item_type", "item_id"], name: "index_log_users_on_item_type_and_item_id", using: :btree add_index "log_users", ["item_type", "item_id"], name: "index_log_users_on_item_type_and_item_id", using: :btree
@ -865,18 +1269,43 @@ ActiveRecord::Schema.define(version: 20150921111842) do
t.datetime "created_at" t.datetime "created_at"
t.string "session" t.string "session"
t.json "children" t.json "children"
t.integer "log_id"
t.integer "registrar_id"
t.string "ipv4"
t.string "ipv6"
t.string "interfaces", array: true
t.datetime "log_created_at"
t.datetime "log_updated_at"
t.string "creator_str"
t.string "updator_str"
end end
create_table "log_zonefile_settings", force: :cascade do |t| create_table "log_zonefile_settings", force: :cascade do |t|
t.string "item_type", null: false t.string "item_type", null: false
t.integer "item_id", null: false t.integer "item_id", null: false
t.string "event", null: false t.string "event", null: false
t.string "whodunnit" t.string "whodunnit"
t.json "object" t.json "object"
t.json "object_changes" t.json "object_changes"
t.datetime "created_at" t.datetime "created_at"
t.string "session" t.string "session"
t.json "children" t.json "children"
t.integer "log_id"
t.string "origin"
t.integer "ttl"
t.integer "refresh"
t.integer "retry"
t.integer "expire"
t.integer "minimum_ttl"
t.string "email"
t.string "master_nameserver"
t.datetime "log_created_at"
t.datetime "log_updated_at"
t.string "creator_str"
t.string "updator_str"
t.text "ns_records"
t.text "a_records"
t.text "a4_records"
end end
add_index "log_zonefile_settings", ["item_type", "item_id"], name: "index_log_zonefile_settings_on_item_type_and_item_id", using: :btree add_index "log_zonefile_settings", ["item_type", "item_id"], name: "index_log_zonefile_settings_on_item_type_and_item_id", using: :btree
@ -890,8 +1319,8 @@ ActiveRecord::Schema.define(version: 20150921111842) do
t.string "cc" t.string "cc"
t.text "body", null: false t.text "body", null: false
t.text "text_body", null: false t.text "text_body", null: false
t.datetime "created_at" t.datetime "created_at", null: false
t.datetime "updated_at" t.datetime "updated_at", null: false
end end
create_table "messages", force: :cascade do |t| create_table "messages", force: :cascade do |t|

View file

@ -19,7 +19,8 @@ registrar1 = Registrar.where(
password: 'password', password: 'password',
identity_code: '51001091072', identity_code: '51001091072',
active: true, active: true,
registrar: registrar1 registrar: registrar1,
roles: ['super']
) )
@ -41,7 +42,8 @@ registrar2 = Registrar.where(
password: 'password', password: 'password',
identity_code: '11412090004', identity_code: '11412090004',
active: true, active: true,
registrar: registrar2 registrar: registrar2,
roles: ['super']
) )

View file

@ -745,7 +745,8 @@ CREATE TABLE dnskeys (
ds_digest character varying, ds_digest character varying,
creator_str character varying, creator_str character varying,
updator_str character varying, updator_str character varying,
legacy_domain_id integer legacy_domain_id integer,
updated_at timestamp without time zone
); );
@ -1170,7 +1171,20 @@ CREATE TABLE log_account_activities (
object_changes json, object_changes json,
created_at timestamp without time zone, created_at timestamp without time zone,
session character varying, session character varying,
children json children json,
log_id integer,
account_id integer,
invoice_id integer,
sum numeric,
currency character varying,
bank_transaction_id integer,
log_created_at timestamp without time zone,
log_updated_at timestamp without time zone,
description character varying,
creator_str character varying,
updator_str character varying,
activity_type character varying,
log_pricelist_id integer
); );
@ -1207,7 +1221,16 @@ CREATE TABLE log_accounts (
object_changes json, object_changes json,
created_at timestamp without time zone, created_at timestamp without time zone,
session character varying, session character varying,
children json children json,
log_id integer,
registrar_id integer,
account_type character varying,
balance numeric,
log_created_at timestamp without time zone,
log_updated_at timestamp without time zone,
currency character varying,
creator_str character varying,
updator_str character varying
); );
@ -1244,7 +1267,21 @@ CREATE TABLE log_addresses (
object_changes json, object_changes json,
created_at timestamp without time zone, created_at timestamp without time zone,
session character varying, session character varying,
children json children json,
log_id integer,
contact_id integer,
city character varying,
street character varying,
zip character varying,
log_created_at timestamp without time zone,
log_updated_at timestamp without time zone,
street2 character varying,
street3 character varying,
creator_str character varying,
updator_str character varying,
country_code character varying,
state character varying,
legacy_contact_id integer
); );
@ -1318,7 +1355,16 @@ CREATE TABLE log_bank_statements (
object_changes json, object_changes json,
created_at timestamp without time zone, created_at timestamp without time zone,
session character varying, session character varying,
children json children json,
log_id integer,
bank_code character varying,
iban character varying,
import_file_path character varying,
queried_at timestamp without time zone,
log_created_at timestamp without time zone,
log_updated_at timestamp without time zone,
creator_str character varying,
updator_str character varying
); );
@ -1355,7 +1401,24 @@ CREATE TABLE log_bank_transactions (
object_changes json, object_changes json,
created_at timestamp without time zone, created_at timestamp without time zone,
session character varying, session character varying,
children json children json,
log_id integer,
bank_statement_id integer,
bank_reference character varying,
iban character varying,
currency character varying,
buyer_bank_code character varying,
buyer_iban character varying,
buyer_name character varying,
document_no character varying,
description character varying,
sum numeric,
reference_no character varying,
paid_at timestamp without time zone,
log_created_at timestamp without time zone,
log_updated_at timestamp without time zone,
creator_str character varying,
updator_str character varying
); );
@ -1392,7 +1455,13 @@ CREATE TABLE log_blocked_domains (
object_changes json, object_changes json,
created_at timestamp without time zone, created_at timestamp without time zone,
session character varying, session character varying,
children json children json,
log_id integer,
names character varying[],
log_created_at timestamp without time zone,
log_updated_at timestamp without time zone,
creator_str character varying,
updator_str character varying
); );
@ -1429,7 +1498,18 @@ CREATE TABLE log_certificates (
object_changes json, object_changes json,
created_at timestamp without time zone, created_at timestamp without time zone,
session character varying, session character varying,
children json children json,
log_id integer,
api_user_id integer,
csr text,
crt text,
creator_str character varying,
updator_str character varying,
log_created_at timestamp without time zone,
log_updated_at timestamp without time zone,
common_name character varying,
md5 character varying,
interface character varying
); );
@ -1504,6 +1584,32 @@ CREATE TABLE log_contacts (
created_at timestamp without time zone, created_at timestamp without time zone,
session character varying, session character varying,
children json, children json,
log_id integer,
code character varying,
phone character varying,
email character varying,
fax character varying,
log_created_at timestamp without time zone,
log_updated_at timestamp without time zone,
ident character varying,
ident_type character varying,
auth_info character varying,
name character varying,
org_name character varying,
registrar_id integer,
creator_str character varying,
updator_str character varying,
ident_country_code character varying,
city character varying,
street text,
zip character varying,
country_code character varying,
state character varying,
legacy_id integer,
statuses character varying[],
status_notes hstore,
legacy_history_id integer,
copy_from_id integer,
ident_updated_at timestamp without time zone ident_updated_at timestamp without time zone
); );
@ -1578,7 +1684,21 @@ CREATE TABLE log_dnskeys (
object_changes json, object_changes json,
created_at timestamp without time zone, created_at timestamp without time zone,
session character varying, session character varying,
children json children json,
log_id integer,
domain_id integer,
flags integer,
protocol integer,
alg integer,
public_key text,
delegation_signer_id integer,
ds_key_tag character varying,
ds_alg integer,
ds_digest_type integer,
ds_digest character varying,
creator_str character varying,
updator_str character varying,
legacy_domain_id integer
); );
@ -1615,7 +1735,19 @@ CREATE TABLE log_domain_contacts (
object_changes json, object_changes json,
created_at timestamp without time zone, created_at timestamp without time zone,
session character varying, session character varying,
children json children json,
log_id integer,
contact_id integer,
domain_id integer,
contact_type character varying,
log_created_at timestamp without time zone,
log_updated_at timestamp without time zone,
contact_code_cache character varying,
creator_str character varying,
updator_str character varying,
type character varying,
legacy_domain_id integer,
legacy_contact_id integer
); );
@ -1652,7 +1784,14 @@ CREATE TABLE log_domain_statuses (
object_changes json, object_changes json,
created_at timestamp without time zone, created_at timestamp without time zone,
session character varying, session character varying,
children json children json,
log_id integer,
domain_id integer,
description character varying,
value character varying,
creator_str character varying,
updator_str character varying,
legacy_domain_id integer
); );
@ -1689,7 +1828,19 @@ CREATE TABLE log_domain_transfers (
object_changes json, object_changes json,
created_at timestamp without time zone, created_at timestamp without time zone,
session character varying, session character varying,
children json children json,
log_id integer,
domain_id integer,
status character varying,
transfer_requested_at timestamp without time zone,
transferred_at timestamp without time zone,
transfer_from_id integer,
transfer_to_id integer,
log_created_at timestamp without time zone,
log_updated_at timestamp without time zone,
wait_until timestamp without time zone,
creator_str character varying,
updator_str character varying
); );
@ -1729,7 +1880,37 @@ CREATE TABLE log_domains (
tech_contact_ids text[] DEFAULT '{}'::text[], tech_contact_ids text[] DEFAULT '{}'::text[],
admin_contact_ids text[] DEFAULT '{}'::text[], admin_contact_ids text[] DEFAULT '{}'::text[],
session character varying, session character varying,
children json children json,
log_id integer,
name character varying,
registrar_id integer,
registered_at timestamp without time zone,
status character varying,
valid_from timestamp without time zone,
valid_to timestamp without time zone,
registrant_id integer,
auth_info character varying,
log_created_at timestamp without time zone,
log_updated_at timestamp without time zone,
name_dirty character varying,
name_puny character varying,
period integer,
period_unit character varying,
creator_str character varying,
updator_str character varying,
legacy_id integer,
legacy_registrar_id integer,
legacy_registrant_id integer,
outzone_at timestamp without time zone,
delete_at timestamp without time zone,
registrant_verification_asked_at timestamp without time zone,
registrant_verification_token character varying,
pending_json json,
force_delete_at timestamp without time zone,
statuses character varying[],
reserved boolean,
status_notes hstore,
statuses_backup character varying[]
); );
@ -1766,7 +1947,17 @@ CREATE TABLE log_invoice_items (
object_changes json, object_changes json,
created_at timestamp without time zone, created_at timestamp without time zone,
session character varying, session character varying,
children json children json,
log_id integer,
invoice_id integer,
description character varying,
unit character varying,
amount integer,
price numeric,
log_created_at timestamp without time zone,
log_updated_at timestamp without time zone,
creator_str character varying,
updator_str character varying
); );
@ -1803,7 +1994,50 @@ CREATE TABLE log_invoices (
object_changes json, object_changes json,
created_at timestamp without time zone, created_at timestamp without time zone,
session character varying, session character varying,
children json children json,
log_id integer,
log_created_at timestamp without time zone,
log_updated_at timestamp without time zone,
invoice_type character varying,
due_date timestamp without time zone,
payment_term character varying,
currency character varying,
description character varying,
reference_no character varying,
vat_prc numeric,
paid_at timestamp without time zone,
seller_id integer,
seller_name character varying,
seller_reg_no character varying,
seller_iban character varying,
seller_bank character varying,
seller_swift character varying,
seller_vat_no character varying,
seller_country_code character varying,
seller_state character varying,
seller_street character varying,
seller_city character varying,
seller_zip character varying,
seller_phone character varying,
seller_url character varying,
seller_email character varying,
seller_contact_name character varying,
buyer_id integer,
buyer_name character varying,
buyer_reg_no character varying,
buyer_country_code character varying,
buyer_state character varying,
buyer_street character varying,
buyer_city character varying,
buyer_zip character varying,
buyer_phone character varying,
buyer_url character varying,
buyer_email character varying,
creator_str character varying,
updator_str character varying,
number integer,
cancelled_at timestamp without time zone,
sum_cache numeric
); );
@ -1840,7 +2074,23 @@ CREATE TABLE log_keyrelays (
object_changes json, object_changes json,
created_at timestamp without time zone, created_at timestamp without time zone,
session character varying, session character varying,
children json children json,
log_id integer,
domain_id integer,
pa_date timestamp without time zone,
key_data_flags character varying,
key_data_protocol character varying,
key_data_alg character varying,
key_data_public_key text,
auth_info_pw character varying,
expiry_relative character varying,
expiry_absolute timestamp without time zone,
requester_id integer,
accepter_id integer,
log_created_at timestamp without time zone,
log_updated_at timestamp without time zone,
creator_str character varying,
updator_str character varying
); );
@ -1877,7 +2127,16 @@ CREATE TABLE log_legal_documents (
object_changes json, object_changes json,
created_at timestamp without time zone, created_at timestamp without time zone,
session character varying, session character varying,
children json children json,
log_id integer,
document_type character varying,
documentable_id integer,
documentable_type character varying,
log_created_at timestamp without time zone,
log_updated_at timestamp without time zone,
creator_str character varying,
updator_str character varying,
path character varying
); );
@ -1900,6 +2159,53 @@ CREATE SEQUENCE log_legal_documents_id_seq
ALTER SEQUENCE log_legal_documents_id_seq OWNED BY log_legal_documents.id; ALTER SEQUENCE log_legal_documents_id_seq OWNED BY log_legal_documents.id;
--
-- Name: log_mail_templates; Type: TABLE; Schema: public; Owner: -; Tablespace:
--
CREATE TABLE log_mail_templates (
id integer NOT NULL,
item_type character varying NOT NULL,
item_id integer NOT NULL,
event character varying NOT NULL,
whodunnit character varying,
object json,
object_changes json,
created_at timestamp without time zone,
session character varying,
children json,
log_id integer,
name character varying,
subject character varying,
"from" character varying,
bcc character varying,
cc character varying,
body text,
text_body text,
log_created_at timestamp without time zone,
log_updated_at timestamp without time zone
);
--
-- Name: log_mail_templates_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE log_mail_templates_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: log_mail_templates_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE log_mail_templates_id_seq OWNED BY log_mail_templates.id;
-- --
-- Name: log_messages; Type: TABLE; Schema: public; Owner: -; Tablespace: -- Name: log_messages; Type: TABLE; Schema: public; Owner: -; Tablespace:
-- --
@ -1914,7 +2220,17 @@ CREATE TABLE log_messages (
object_changes json, object_changes json,
created_at timestamp without time zone, created_at timestamp without time zone,
session character varying, session character varying,
children json children json,
log_id integer,
registrar_id integer,
body character varying,
attached_obj_type character varying,
attached_obj_id character varying,
queued boolean,
log_created_at timestamp without time zone,
log_updated_at timestamp without time zone,
creator_str character varying,
updator_str character varying
); );
@ -1951,7 +2267,17 @@ CREATE TABLE log_nameservers (
object_changes json, object_changes json,
created_at timestamp without time zone, created_at timestamp without time zone,
session character varying, session character varying,
children json children json,
log_id integer,
hostname character varying,
ipv4 character varying,
log_created_at timestamp without time zone,
log_updated_at timestamp without time zone,
ipv6 character varying,
domain_id integer,
creator_str character varying,
updator_str character varying,
legacy_domain_id integer
); );
@ -1987,7 +2313,20 @@ CREATE TABLE log_pricelists (
object json, object json,
object_changes json, object_changes json,
created_at timestamp without time zone, created_at timestamp without time zone,
session character varying session character varying,
log_id integer,
"desc" character varying,
category character varying,
price_cents numeric,
price_currency character varying,
valid_from timestamp without time zone,
valid_to timestamp without time zone,
creator_str character varying,
updator_str character varying,
log_created_at timestamp without time zone,
log_updated_at timestamp without time zone,
duration character varying,
operation_category character varying
); );
@ -2010,6 +2349,51 @@ CREATE SEQUENCE log_pricelists_id_seq
ALTER SEQUENCE log_pricelists_id_seq OWNED BY log_pricelists.id; ALTER SEQUENCE log_pricelists_id_seq OWNED BY log_pricelists.id;
--
-- Name: log_registrant_verifications; Type: TABLE; Schema: public; Owner: -; Tablespace:
--
CREATE TABLE log_registrant_verifications (
id integer NOT NULL,
item_type character varying NOT NULL,
item_id integer NOT NULL,
event character varying NOT NULL,
whodunnit character varying,
object json,
object_changes json,
created_at timestamp without time zone,
session character varying,
children json,
log_id integer,
domain_name character varying,
verification_token character varying,
log_created_at timestamp without time zone,
log_updated_at timestamp without time zone,
action character varying,
domain_id integer,
action_type character varying
);
--
-- Name: log_registrant_verifications_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE log_registrant_verifications_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: log_registrant_verifications_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE log_registrant_verifications_id_seq OWNED BY log_registrant_verifications.id;
-- --
-- Name: log_registrars; Type: TABLE; Schema: public; Owner: -; Tablespace: -- Name: log_registrars; Type: TABLE; Schema: public; Owner: -; Tablespace:
-- --
@ -2024,7 +2408,30 @@ CREATE TABLE log_registrars (
object_changes json, object_changes json,
created_at timestamp without time zone, created_at timestamp without time zone,
session character varying, session character varying,
children json children json,
log_id integer,
name character varying,
reg_no character varying,
vat_no character varying,
billing_address character varying,
log_created_at timestamp without time zone,
log_updated_at timestamp without time zone,
creator_str character varying,
updator_str character varying,
phone character varying,
email character varying,
billing_email character varying,
country_code character varying,
state character varying,
city character varying,
street character varying,
zip character varying,
code character varying,
url character varying,
directo_handle character varying,
vat boolean,
legacy_id integer,
reference_no character varying
); );
@ -2061,7 +2468,13 @@ CREATE TABLE log_reserved_domains (
object_changes json, object_changes json,
created_at timestamp without time zone, created_at timestamp without time zone,
session character varying, session character varying,
children json children json,
log_id integer,
log_created_at timestamp without time zone,
log_updated_at timestamp without time zone,
creator_str character varying,
updator_str character varying,
names hstore
); );
@ -2098,7 +2511,16 @@ CREATE TABLE log_settings (
object_changes json, object_changes json,
created_at timestamp without time zone, created_at timestamp without time zone,
session character varying, session character varying,
children json children json,
log_id integer,
var character varying,
value text,
thing_id integer,
thing_type character varying,
log_created_at timestamp without time zone,
log_updated_at timestamp without time zone,
creator_str character varying,
updator_str character varying
); );
@ -2135,7 +2557,33 @@ CREATE TABLE log_users (
object_changes json, object_changes json,
created_at timestamp without time zone, created_at timestamp without time zone,
session character varying, session character varying,
children json children json,
log_id integer,
username character varying,
password character varying,
log_created_at timestamp without time zone,
log_updated_at timestamp without time zone,
email character varying,
sign_in_count integer,
current_sign_in_at timestamp without time zone,
last_sign_in_at timestamp without time zone,
current_sign_in_ip inet,
last_sign_in_ip inet,
identity_code character varying,
roles character varying[],
creator_str character varying,
updator_str character varying,
country_code character varying,
registrar_id integer,
active boolean,
csr text,
crt text,
type character varying,
registrant_ident character varying,
encrypted_password character varying,
remember_created_at timestamp without time zone,
failed_attempts integer,
locked_at timestamp without time zone
); );
@ -2172,7 +2620,16 @@ CREATE TABLE log_white_ips (
object_changes json, object_changes json,
created_at timestamp without time zone, created_at timestamp without time zone,
session character varying, session character varying,
children json children json,
log_id integer,
registrar_id integer,
ipv4 character varying,
ipv6 character varying,
interfaces character varying[],
log_created_at timestamp without time zone,
log_updated_at timestamp without time zone,
creator_str character varying,
updator_str character varying
); );
@ -2209,7 +2666,23 @@ CREATE TABLE log_zonefile_settings (
object_changes json, object_changes json,
created_at timestamp without time zone, created_at timestamp without time zone,
session character varying, session character varying,
children json children json,
log_id integer,
origin character varying,
ttl integer,
refresh integer,
retry integer,
expire integer,
minimum_ttl integer,
email character varying,
master_nameserver character varying,
log_created_at timestamp without time zone,
log_updated_at timestamp without time zone,
creator_str character varying,
updator_str character varying,
ns_records text,
a_records text,
a4_records text
); );
@ -2245,8 +2718,8 @@ CREATE TABLE mail_templates (
cc character varying, cc character varying,
body text NOT NULL, body text NOT NULL,
text_body text NOT NULL, text_body text NOT NULL,
created_at timestamp without time zone, created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone updated_at timestamp without time zone NOT NULL
); );
@ -3132,6 +3605,13 @@ ALTER TABLE ONLY log_keyrelays ALTER COLUMN id SET DEFAULT nextval('log_keyrelay
ALTER TABLE ONLY log_legal_documents ALTER COLUMN id SET DEFAULT nextval('log_legal_documents_id_seq'::regclass); ALTER TABLE ONLY log_legal_documents ALTER COLUMN id SET DEFAULT nextval('log_legal_documents_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY log_mail_templates ALTER COLUMN id SET DEFAULT nextval('log_mail_templates_id_seq'::regclass);
-- --
-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- Name: id; Type: DEFAULT; Schema: public; Owner: -
-- --
@ -3153,6 +3633,13 @@ ALTER TABLE ONLY log_nameservers ALTER COLUMN id SET DEFAULT nextval('log_namese
ALTER TABLE ONLY log_pricelists ALTER COLUMN id SET DEFAULT nextval('log_pricelists_id_seq'::regclass); ALTER TABLE ONLY log_pricelists ALTER COLUMN id SET DEFAULT nextval('log_pricelists_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY log_registrant_verifications ALTER COLUMN id SET DEFAULT nextval('log_registrant_verifications_id_seq'::regclass);
-- --
-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- Name: id; Type: DEFAULT; Schema: public; Owner: -
-- --
@ -3652,6 +4139,14 @@ ALTER TABLE ONLY log_legal_documents
ADD CONSTRAINT log_legal_documents_pkey PRIMARY KEY (id); ADD CONSTRAINT log_legal_documents_pkey PRIMARY KEY (id);
--
-- Name: log_mail_templates_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
--
ALTER TABLE ONLY log_mail_templates
ADD CONSTRAINT log_mail_templates_pkey PRIMARY KEY (id);
-- --
-- Name: log_messages_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- Name: log_messages_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
-- --
@ -3676,6 +4171,14 @@ ALTER TABLE ONLY log_pricelists
ADD CONSTRAINT log_pricelists_pkey PRIMARY KEY (id); ADD CONSTRAINT log_pricelists_pkey PRIMARY KEY (id);
--
-- Name: log_registrant_verifications_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
--
ALTER TABLE ONLY log_registrant_verifications
ADD CONSTRAINT log_registrant_verifications_pkey PRIMARY KEY (id);
-- --
-- Name: log_registrars_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- Name: log_registrars_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
-- --
@ -4362,6 +4865,20 @@ CREATE INDEX index_log_legal_documents_on_item_type_and_item_id ON log_legal_doc
CREATE INDEX index_log_legal_documents_on_whodunnit ON log_legal_documents USING btree (whodunnit); CREATE INDEX index_log_legal_documents_on_whodunnit ON log_legal_documents USING btree (whodunnit);
--
-- Name: index_log_mail_templates_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
CREATE INDEX index_log_mail_templates_on_item_type_and_item_id ON log_mail_templates USING btree (item_type, item_id);
--
-- Name: index_log_mail_templates_on_whodunnit; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
CREATE INDEX index_log_mail_templates_on_whodunnit ON log_mail_templates USING btree (whodunnit);
-- --
-- Name: index_log_messages_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- Name: index_log_messages_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
-- --
@ -4390,6 +4907,20 @@ CREATE INDEX index_log_nameservers_on_item_type_and_item_id ON log_nameservers U
CREATE INDEX index_log_nameservers_on_whodunnit ON log_nameservers USING btree (whodunnit); CREATE INDEX index_log_nameservers_on_whodunnit ON log_nameservers USING btree (whodunnit);
--
-- Name: index_log_registrant_verifications_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
CREATE INDEX index_log_registrant_verifications_on_item_type_and_item_id ON log_registrant_verifications USING btree (item_type, item_id);
--
-- Name: index_log_registrant_verifications_on_whodunnit; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
CREATE INDEX index_log_registrant_verifications_on_whodunnit ON log_registrant_verifications USING btree (whodunnit);
-- --
-- Name: index_log_registrars_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- Name: index_log_registrars_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
-- --
@ -4930,8 +5461,6 @@ INSERT INTO schema_migrations (version) VALUES ('20150803080914');
INSERT INTO schema_migrations (version) VALUES ('20150810114746'); INSERT INTO schema_migrations (version) VALUES ('20150810114746');
INSERT INTO schema_migrations (version) VALUES ('20150810114747');
INSERT INTO schema_migrations (version) VALUES ('20150825125118'); INSERT INTO schema_migrations (version) VALUES ('20150825125118');
INSERT INTO schema_migrations (version) VALUES ('20150827151906'); INSERT INTO schema_migrations (version) VALUES ('20150827151906');
@ -4942,7 +5471,15 @@ INSERT INTO schema_migrations (version) VALUES ('20150910113839');
INSERT INTO schema_migrations (version) VALUES ('20150915094707'); INSERT INTO schema_migrations (version) VALUES ('20150915094707');
INSERT INTO schema_migrations (version) VALUES ('20150918135710');
INSERT INTO schema_migrations (version) VALUES ('20150918140948');
INSERT INTO schema_migrations (version) VALUES ('20150918142422');
INSERT INTO schema_migrations (version) VALUES ('20150921110152'); INSERT INTO schema_migrations (version) VALUES ('20150921110152');
INSERT INTO schema_migrations (version) VALUES ('20150921111842'); INSERT INTO schema_migrations (version) VALUES ('20150921111842');
INSERT INTO schema_migrations (version) VALUES ('20151028183132');

View file

@ -32,7 +32,7 @@ Contact Mapping protocol short version:
<eis:extdata> 1 Attribute: xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd" <eis:extdata> 1 Attribute: xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd"
<eis:ident> 1 Contact identificator <eis:ident> 1 Contact identificator
Attribute: "type" Attribute: "type"
"bic" # Business registry code "org" # Business registry code
"priv" # National idendtification number "priv" # National idendtification number
"birthday" # Birthday date in format in DD-MM-YYYY "birthday" # Birthday date in format in DD-MM-YYYY
Attribute: "cc" Attribute: "cc"
@ -68,7 +68,7 @@ Contact Mapping protocol short version:
<eis:extdata> 0-1 Attribute: xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd" <eis:extdata> 0-1 Attribute: xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd"
<eis:ident> 0-1 Contact identificator <eis:ident> 0-1 Contact identificator
Attribute: "type" Attribute: "type"
"bic" # Business registry code "org" # Business registry code
"priv" # National idendtification number "priv" # National idendtification number
"birthday" # Birthday date in format in DD-MM-YYYY "birthday" # Birthday date in format in DD-MM-YYYY
Attribute: "cc" Attribute: "cc"

View file

@ -5,7 +5,7 @@
#define EPP_TCP_HEADER_SIZE 4 /* just one longword */ #define EPP_TCP_HEADER_SIZE 4 /* just one longword */
-#define EPP_MAX_FRAME_SIZE 65536 /* don't accept larger xml data blocks */ -#define EPP_MAX_FRAME_SIZE 65536 /* don't accept larger xml data blocks */
+#define EPP_MAX_FRAME_SIZE 8388608 /* don't accept larger xml data blocks */ +#define EPP_MAX_FRAME_SIZE 15728640 /* don't accept larger xml data blocks (8MB + 30% base64 + xml + savings)*/
#define TRIDSIZE 128 /* actually, it should be 3 to 64 chars, #define TRIDSIZE 128 /* actually, it should be 3 to 64 chars,
but due to unicode we'll give it more room. */ but due to unicode we'll give it more room. */

388
doc/schemas/contact-1.0.xsd Normal file
View file

@ -0,0 +1,388 @@
<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="urn:ietf:params:xml:ns:contact-1.0"
xmlns:contact="urn:ietf:params:xml:ns:contact-1.0"
xmlns:epp="urn:ietf:params:xml:ns:epp-1.0"
xmlns:eppcom="urn:ietf:params:xml:ns:eppcom-1.0"
xmlns="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<!--
Import common element types.
-->
<import namespace="urn:ietf:params:xml:ns:eppcom-1.0"/>
<import namespace="urn:ietf:params:xml:ns:epp-1.0"/>
<annotation>
<documentation>
Extensible Provisioning Protocol v1.0
contact provisioning schema.
</documentation>
</annotation>
<!--
Child elements found in EPP commands.
-->
<element name="check" type="contact:mIDType"/>
<element name="create" type="contact:createType"/>
<element name="delete" type="contact:sIDType"/>
<element name="info" type="contact:authIDType"/>
<element name="transfer" type="contact:authIDType"/>
<element name="update" type="contact:updateType"/>
<!--
Utility types.
-->
<simpleType name="ccType">
<restriction base="token">
<length value="2"/>
</restriction>
</simpleType>
<complexType name="e164Type">
<simpleContent>
<extension base="contact:e164StringType">
<attribute name="x" type="token"/>
</extension>
</simpleContent>
</complexType>
<simpleType name="e164StringType">
<restriction base="token">
<pattern value="(\+[0-9]{1,3}\.[0-9]{1,14})?"/>
<maxLength value="17"/>
</restriction>
</simpleType>
<simpleType name="pcType">
<restriction base="token">
<maxLength value="16"/>
</restriction>
</simpleType>
<simpleType name="postalLineType">
<restriction base="normalizedString">
<minLength value="1"/>
<maxLength value="255"/>
</restriction>
</simpleType>
<simpleType name="optPostalLineType">
<restriction base="normalizedString">
<maxLength value="255"/>
</restriction>
</simpleType>
<!--
Child elements of the <create> command.
-->
<complexType name="createType">
<sequence>
<element name="id" type="eppcom:clIDType"/>
<element name="postalInfo" type="contact:postalInfoType"
maxOccurs="2"/>
<element name="voice" type="contact:e164Type"
minOccurs="0"/>
<element name="fax" type="contact:e164Type"
minOccurs="0"/>
<element name="email" type="eppcom:minTokenType"/>
<element name="authInfo" type="contact:authInfoType"/>
<element name="disclose" type="contact:discloseType"
minOccurs="0"/>
</sequence>
</complexType>
<complexType name="postalInfoType">
<sequence>
<element name="name" type="contact:postalLineType"/>
<element name="org" type="contact:optPostalLineType"
minOccurs="0"/>
<element name="addr" type="contact:addrType"/>
</sequence>
<attribute name="type" type="contact:postalInfoEnumType"
use="required"/>
</complexType>
<simpleType name="postalInfoEnumType">
<restriction base="token">
<enumeration value="loc"/>
<enumeration value="int"/>
</restriction>
</simpleType>
<complexType name="addrType">
<sequence>
<element name="street" type="contact:optPostalLineType"
minOccurs="0" maxOccurs="3"/>
<element name="city" type="contact:postalLineType"/>
<element name="sp" type="contact:optPostalLineType"
minOccurs="0"/>
<element name="pc" type="contact:pcType"
minOccurs="0"/>
<element name="cc" type="contact:ccType"/>
</sequence>
</complexType>
<complexType name="authInfoType">
<choice>
<element name="pw" type="eppcom:pwAuthInfoType"/>
<element name="ext" type="eppcom:extAuthInfoType"/>
</choice>
</complexType>
<complexType name="discloseType">
<sequence>
<element name="name" type="contact:intLocType"
minOccurs="0" maxOccurs="2"/>
<element name="org" type="contact:intLocType"
minOccurs="0" maxOccurs="2"/>
<element name="addr" type="contact:intLocType"
minOccurs="0" maxOccurs="2"/>
<element name="voice" minOccurs="0"/>
<element name="fax" minOccurs="0"/>
<element name="email" minOccurs="0"/>
</sequence>
<attribute name="flag" type="boolean" use="required"/>
</complexType>
<complexType name="intLocType">
<attribute name="type" type="contact:postalInfoEnumType"
use="required"/>
</complexType>
<!--
Child element of commands that require only an identifier.
-->
<complexType name="sIDType">
<sequence>
<element name="id" type="eppcom:clIDType"/>
</sequence>
</complexType>
<!--
Child element of commands that accept multiple identifiers.
-->
<complexType name="mIDType">
<sequence>
<element name="id" type="eppcom:clIDType"
maxOccurs="unbounded"/>
</sequence>
</complexType>
<!--
Child elements of the <info> and <transfer> commands.
-->
<complexType name="authIDType">
<sequence>
<element name="id" type="eppcom:clIDType"/>
<element name="authInfo" type="contact:authInfoType"
minOccurs="0"/>
</sequence>
</complexType>
<!--
Child elements of the <update> command.
-->
<complexType name="updateType">
<sequence>
<element name="id" type="eppcom:clIDType"/>
<element name="add" type="contact:addRemType"
minOccurs="0"/>
<element name="rem" type="contact:addRemType"
minOccurs="0"/>
<element name="chg" type="contact:chgType"
minOccurs="0"/>
</sequence>
</complexType>
<!--
Data elements that can be added or removed.
-->
<complexType name="addRemType">
<sequence>
<element name="status" type="contact:statusType"
maxOccurs="7"/>
</sequence>
</complexType>
<!--
Data elements that can be changed.
-->
<complexType name="chgType">
<sequence>
<element name="postalInfo" type="contact:chgPostalInfoType"
minOccurs="0" maxOccurs="2"/>
<element name="voice" type="contact:e164Type"
minOccurs="0"/>
<element name="fax" type="contact:e164Type"
minOccurs="0"/>
<element name="email" type="eppcom:minTokenType"
minOccurs="0"/>
<element name="authInfo" type="contact:authInfoType"
minOccurs="0"/>
<element name="disclose" type="contact:discloseType"
minOccurs="0"/>
</sequence>
</complexType>
<complexType name="chgPostalInfoType">
<sequence>
<element name="name" type="contact:postalLineType"
minOccurs="0"/>
<element name="org" type="contact:optPostalLineType"
minOccurs="0"/>
<element name="addr" type="contact:addrType"
minOccurs="0"/>
</sequence>
<attribute name="type" type="contact:postalInfoEnumType"
use="required"/>
</complexType>
<!--
Child response elements.
-->
<element name="chkData" type="contact:chkDataType"/>
<element name="creData" type="contact:creDataType"/>
<element name="infData" type="contact:infDataType"/>
<element name="panData" type="contact:panDataType"/>
<element name="trnData" type="contact:trnDataType"/>
<!--
<check> response elements.
-->
<complexType name="chkDataType">
<sequence>
<element name="cd" type="contact:checkType"
maxOccurs="unbounded"/>
</sequence>
</complexType>
<complexType name="checkType">
<sequence>
<element name="id" type="contact:checkIDType"/>
<element name="reason" type="eppcom:reasonType"
minOccurs="0"/>
</sequence>
</complexType>
<complexType name="checkIDType">
<simpleContent>
<extension base="eppcom:clIDType">
<attribute name="avail" type="boolean"
use="required"/>
</extension>
</simpleContent>
</complexType>
<!--
<create> response elements.
-->
<complexType name="creDataType">
<sequence>
<element name="id" type="eppcom:clIDType"/>
<element name="crDate" type="dateTime"/>
</sequence>
</complexType>
<!--
<info> response elements.
-->
<complexType name="infDataType">
<sequence>
<element name="id" type="eppcom:clIDType"/>
<element name="roid" type="eppcom:roidType"/>
<element name="status" type="contact:statusType"
maxOccurs="7"/>
<element name="postalInfo" type="contact:postalInfoType"
maxOccurs="2"/>
<element name="voice" type="contact:e164Type"
minOccurs="0"/>
<element name="fax" type="contact:e164Type"
minOccurs="0"/>
<element name="email" type="eppcom:minTokenType"/>
<element name="clID" type="eppcom:clIDType"/>
<element name="crID" type="eppcom:clIDType"/>
<element name="crDate" type="dateTime"/>
<element name="upID" type="eppcom:clIDType"
minOccurs="0"/>
<element name="upDate" type="dateTime"
minOccurs="0"/>
<element name="trDate" type="dateTime"
minOccurs="0"/>
<element name="authInfo" type="contact:authInfoType"
minOccurs="0"/>
<element name="disclose" type="contact:discloseType"
minOccurs="0"/>
</sequence>
</complexType>
<!--
Status is a combination of attributes and an optional human-readable
message that may be expressed in languages other than English.
-->
<complexType name="statusType">
<simpleContent>
<extension base="normalizedString">
<attribute name="s" type="contact:statusValueType"
use="required"/>
<attribute name="lang" type="language"
default="en"/>
</extension>
</simpleContent>
</complexType>
<simpleType name="statusValueType">
<restriction base="token">
<enumeration value="clientDeleteProhibited"/>
<enumeration value="clientTransferProhibited"/>
<enumeration value="clientUpdateProhibited"/>
<enumeration value="linked"/>
<enumeration value="ok"/>
<enumeration value="pendingCreate"/>
<enumeration value="pendingDelete"/>
<enumeration value="pendingTransfer"/>
<enumeration value="pendingUpdate"/>
<enumeration value="serverDeleteProhibited"/>
<enumeration value="serverTransferProhibited"/>
<enumeration value="serverUpdateProhibited"/>
</restriction>
</simpleType>
<!--
Pending action notification response elements.
-->
<complexType name="panDataType">
<sequence>
<element name="id" type="contact:paCLIDType"/>
<element name="paTRID" type="epp:trIDType"/>
<element name="paDate" type="dateTime"/>
</sequence>
</complexType>
<complexType name="paCLIDType">
<simpleContent>
<extension base="eppcom:clIDType">
<attribute name="paResult" type="boolean"
use="required"/>
</extension>
</simpleContent>
</complexType>
<!--
<transfer> response elements.
-->
<complexType name="trnDataType">
<sequence>
<element name="id" type="eppcom:clIDType"/>
<element name="trStatus" type="eppcom:trStatusType"/>
<element name="reID" type="eppcom:clIDType"/>
<element name="reDate" type="dateTime"/>
<element name="acID" type="eppcom:clIDType"/>
<element name="acDate" type="dateTime"/>
</sequence>
</complexType>
<!--
End of schema.
-->
</schema>

432
doc/schemas/domain-1.0.xsd Normal file
View file

@ -0,0 +1,432 @@
<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="urn:ietf:params:xml:ns:domain-1.0"
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0"
xmlns:host="urn:ietf:params:xml:ns:host-1.0"
xmlns:epp="urn:ietf:params:xml:ns:epp-1.0"
xmlns:eppcom="urn:ietf:params:xml:ns:eppcom-1.0"
xmlns="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<!--
Import common element types.
-->
<import namespace="urn:ietf:params:xml:ns:eppcom-1.0"/>
<import namespace="urn:ietf:params:xml:ns:epp-1.0"/>
<import namespace="urn:ietf:params:xml:ns:host-1.0"/>
<annotation>
<documentation>
Extensible Provisioning Protocol v1.0
domain provisioning schema.
</documentation>
</annotation>
<!--
Child elements found in EPP commands.
-->
<element name="check" type="domain:mNameType"/>
<element name="create" type="domain:createType"/>
<element name="delete" type="domain:sNameType"/>
<element name="info" type="domain:infoType"/>
<element name="renew" type="domain:renewType"/>
<element name="transfer" type="domain:transferType"/>
<element name="update" type="domain:updateType"/>
<!--
Child elements of the <create> command.
-->
<complexType name="createType">
<sequence>
<element name="name" type="eppcom:labelType"/>
<element name="period" type="domain:periodType"
minOccurs="0"/>
<element name="ns" type="domain:nsType"
minOccurs="0"/>
<element name="registrant" type="eppcom:clIDType"
minOccurs="0"/>
<element name="contact" type="domain:contactType"
minOccurs="0" maxOccurs="unbounded"/>
<element name="authInfo" type="domain:authInfoType"/>
</sequence>
</complexType>
<complexType name="periodType">
<simpleContent>
<extension base="domain:pLimitType">
<attribute name="unit" type="domain:pUnitType"
use="required"/>
</extension>
</simpleContent>
</complexType>
<simpleType name="pLimitType">
<restriction base="unsignedShort">
<minInclusive value="1"/>
<maxInclusive value="99"/>
</restriction>
</simpleType>
<simpleType name="pUnitType">
<restriction base="token">
<enumeration value="y"/>
<enumeration value="m"/>
</restriction>
</simpleType>
<complexType name="nsType">
<choice>
<element name="hostObj" type="eppcom:labelType"
maxOccurs="unbounded"/>
<element name="hostAttr" type="domain:hostAttrType"
maxOccurs="unbounded"/>
</choice>
</complexType>
<!--
Name servers are either host objects or attributes.
-->
<complexType name="hostAttrType">
<sequence>
<element name="hostName" type="eppcom:labelType"/>
<element name="hostAddr" type="host:addrType"
minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</complexType>
<!--
If attributes, addresses are optional and follow the
structure defined in the host mapping.
-->
<complexType name="contactType">
<simpleContent>
<extension base="eppcom:clIDType">
<attribute name="type" type="domain:contactAttrType"/>
</extension>
</simpleContent>
</complexType>
<simpleType name="contactAttrType">
<restriction base="token">
<enumeration value="admin"/>
<enumeration value="billing"/>
<enumeration value="tech"/>
</restriction>
</simpleType>
<complexType name="authInfoType">
<choice>
<element name="pw" type="eppcom:pwAuthInfoType"/>
<element name="ext" type="eppcom:extAuthInfoType"/>
</choice>
</complexType>
<!--
Child element of commands that require a single name.
-->
<complexType name="sNameType">
<sequence>
<element name="name" type="eppcom:labelType"/>
</sequence>
</complexType>
<!--
Child element of commands that accept multiple names.
-->
<complexType name="mNameType">
<sequence>
<element name="name" type="eppcom:labelType"
maxOccurs="unbounded"/>
</sequence>
</complexType>
<!--
Child elements of the <info> command.
-->
<complexType name="infoType">
<sequence>
<element name="name" type="domain:infoNameType"/>
<element name="authInfo" type="domain:authInfoType"
minOccurs="0"/>
</sequence>
</complexType>
<complexType name="infoNameType">
<simpleContent>
<extension base = "eppcom:labelType">
<attribute name="hosts" type="domain:hostsType"
default="all"/>
</extension>
</simpleContent>
</complexType>
<simpleType name="hostsType">
<restriction base="token">
<enumeration value="all"/>
<enumeration value="del"/>
<enumeration value="none"/>
<enumeration value="sub"/>
</restriction>
</simpleType>
<!--
Child elements of the <renew> command.
-->
<complexType name="renewType">
<sequence>
<element name="name" type="eppcom:labelType"/>
<element name="curExpDate" type="date"/>
<element name="period" type="domain:periodType"
minOccurs="0"/>
</sequence>
</complexType>
<!--
Child elements of the <transfer> command.
-->
<complexType name="transferType">
<sequence>
<element name="name" type="eppcom:labelType"/>
<element name="period" type="domain:periodType"
minOccurs="0"/>
<element name="authInfo" type="domain:authInfoType"
minOccurs="0"/>
</sequence>
</complexType>
<!--
Child elements of the <update> command.
-->
<complexType name="updateType">
<sequence>
<element name="name" type="eppcom:labelType"/>
<element name="add" type="domain:addRemType"
minOccurs="0"/>
<element name="rem" type="domain:addRemType"
minOccurs="0"/>
<element name="chg" type="domain:chgType"
minOccurs="0"/>
</sequence>
</complexType>
<!--
Data elements that can be added or removed.
-->
<complexType name="addRemType">
<sequence>
<element name="ns" type="domain:nsType"
minOccurs="0"/>
<element name="contact" type="domain:contactType"
minOccurs="0" maxOccurs="unbounded"/>
<element name="status" type="domain:statusType"
minOccurs="0" maxOccurs="11"/>
</sequence>
</complexType>
<!--
Data elements that can be changed.
-->
<complexType name="chgType">
<sequence>
<element name="registrant" type="domain:clIDChgType"
minOccurs="0"/>
<element name="authInfo" type="domain:authInfoChgType"
minOccurs="0"/>
</sequence>
</complexType>
<!--
Allow the registrant value to be nullified by changing the
minLength restriction to "0".
-->
<simpleType name="clIDChgType">
<restriction base="token">
<minLength value="0"/>
<maxLength value="16"/>
</restriction>
</simpleType>
<!--
Allow the authInfo value to be nullified by including an
empty element within the choice.
-->
<complexType name="authInfoChgType">
<choice>
<element name="pw" type="eppcom:pwAuthInfoType"/>
<element name="ext" type="eppcom:extAuthInfoType"/>
<element name="null"/>
</choice>
</complexType>
<!--
Child response elements.
-->
<element name="chkData" type="domain:chkDataType"/>
<element name="creData" type="domain:creDataType"/>
<element name="infData" type="domain:infDataType"/>
<element name="panData" type="domain:panDataType"/>
<element name="renData" type="domain:renDataType"/>
<element name="trnData" type="domain:trnDataType"/>
<!--
<check> response elements.
-->
<complexType name="chkDataType">
<sequence>
<element name="cd" type="domain:checkType"
maxOccurs="unbounded"/>
</sequence>
</complexType>
<complexType name="checkType">
<sequence>
<element name="name" type="domain:checkNameType"/>
<element name="reason" type="eppcom:reasonType"
minOccurs="0"/>
</sequence>
</complexType>
<complexType name="checkNameType">
<simpleContent>
<extension base="eppcom:labelType">
<attribute name="avail" type="boolean"
use="required"/>
</extension>
</simpleContent>
</complexType>
<!--
<create> response elements.
-->
<complexType name="creDataType">
<sequence>
<element name="name" type="eppcom:labelType"/>
<element name="crDate" type="dateTime"/>
<element name="exDate" type="dateTime"
minOccurs="0"/>
</sequence>
</complexType>
<!--
<info> response elements.
-->
<complexType name="infDataType">
<sequence>
<element name="name" type="eppcom:labelType"/>
<element name="roid" type="eppcom:roidType"/>
<element name="status" type="domain:statusType"
minOccurs="0" maxOccurs="11"/>
<element name="registrant" type="eppcom:clIDType"
minOccurs="0"/>
<element name="contact" type="domain:contactType"
minOccurs="0" maxOccurs="unbounded"/>
<element name="ns" type="domain:nsType"
minOccurs="0"/>
<element name="host" type="eppcom:labelType"
minOccurs="0" maxOccurs="unbounded"/>
<element name="clID" type="eppcom:clIDType"/>
<element name="crID" type="eppcom:clIDType"
minOccurs="0"/>
<element name="crDate" type="dateTime"
minOccurs="0"/>
<element name="upID" type="eppcom:clIDType"
minOccurs="0"/>
<element name="upDate" type="dateTime"
minOccurs="0"/>
<element name="exDate" type="dateTime"
minOccurs="0"/>
<element name="trDate" type="dateTime"
minOccurs="0"/>
<element name="authInfo" type="domain:authInfoType"
minOccurs="0"/>
</sequence>
</complexType>
<!--
Status is a combination of attributes and an optional
human-readable message that may be expressed in languages other
than English.
-->
<complexType name="statusType">
<simpleContent>
<extension base="normalizedString">
<attribute name="s" type="domain:statusValueType"
use="required"/>
<attribute name="lang" type="language"
default="en"/>
</extension>
</simpleContent>
</complexType>
<simpleType name="statusValueType">
<restriction base="token">
<enumeration value="clientDeleteProhibited"/>
<enumeration value="clientHold"/>
<enumeration value="clientRenewProhibited"/>
<enumeration value="clientTransferProhibited"/>
<enumeration value="clientUpdateProhibited"/>
<enumeration value="inactive"/>
<enumeration value="ok"/>
<enumeration value="pendingCreate"/>
<enumeration value="pendingDelete"/>
<enumeration value="pendingRenew"/>
<enumeration value="pendingTransfer"/>
<enumeration value="pendingUpdate"/>
<enumeration value="serverDeleteProhibited"/>
<enumeration value="serverHold"/>
<enumeration value="serverRenewProhibited"/>
<enumeration value="serverTransferProhibited"/>
<enumeration value="serverUpdateProhibited"/>
</restriction>
</simpleType>
<!--
Pending action notification response elements.
-->
<complexType name="panDataType">
<sequence>
<element name="name" type="domain:paNameType"/>
<element name="paTRID" type="epp:trIDType"/>
<element name="paDate" type="dateTime"/>
</sequence>
</complexType>
<complexType name="paNameType">
<simpleContent>
<extension base="eppcom:labelType">
<attribute name="paResult" type="boolean"
use="required"/>
</extension>
</simpleContent>
</complexType>
<!--
<renew> response elements.
-->
<complexType name="renDataType">
<sequence>
<element name="name" type="eppcom:labelType"/>
<element name="exDate" type="dateTime"
minOccurs="0"/>
</sequence>
</complexType>
<!--
<transfer> response elements.
-->
<complexType name="trnDataType">
<sequence>
<element name="name" type="eppcom:labelType"/>
<element name="trStatus" type="eppcom:trStatusType"/>
<element name="reID" type="eppcom:clIDType"/>
<element name="reDate" type="dateTime"/>
<element name="acID" type="eppcom:clIDType"/>
<element name="acDate" type="dateTime"/>
<element name="exDate" type="dateTime"
minOccurs="0"/>
</sequence>
</complexType>
<!--
End of schema.
-->
</schema>

446
doc/schemas/epp-1.0.xsd Normal file
View file

@ -0,0 +1,446 @@
<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="urn:ietf:params:xml:ns:epp-1.0"
xmlns:epp="urn:ietf:params:xml:ns:epp-1.0"
xmlns:eppcom="urn:ietf:params:xml:ns:eppcom-1.0"
xmlns="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<!--
Import common element types.
-->
<import namespace="urn:ietf:params:xml:ns:eppcom-1.0"/>
<annotation>
<documentation>
Extensible Provisioning Protocol v1.0 schema.
</documentation>
</annotation>
<!--
Every EPP XML instance must begin with this element.
-->
<element name="epp" type="epp:eppType"/>
<!--
An EPP XML instance must contain a greeting, hello, command,
response, or extension.
-->
<complexType name="eppType">
<choice>
<element name="greeting" type="epp:greetingType"/>
<element name="hello"/>
<element name="command" type="epp:commandType"/>
<element name="response" type="epp:responseType"/>
<element name="extension" type="epp:extAnyType"/>
</choice>
</complexType>
<!--
A greeting is sent by a server in response to a client connection
or <hello>.
-->
<complexType name="greetingType">
<sequence>
<element name="svID" type="epp:sIDType"/>
<element name="svDate" type="dateTime"/>
<element name="svcMenu" type="epp:svcMenuType"/>
<element name="dcp" type="epp:dcpType"/>
</sequence>
</complexType>
<!--
Server IDs are strings with minimum and maximum length restrictions.
-->
<simpleType name="sIDType">
<restriction base="normalizedString">
<minLength value="3"/>
<maxLength value="64"/>
</restriction>
</simpleType>
<!--
A server greeting identifies available object services.
-->
<complexType name="svcMenuType">
<sequence>
<element name="version" type="epp:versionType"
maxOccurs="unbounded"/>
<element name="lang" type="language"
maxOccurs="unbounded"/>
<element name="objURI" type="anyURI"
maxOccurs="unbounded"/>
<element name="svcExtension" type="epp:extURIType"
minOccurs="0"/>
</sequence>
</complexType>
<!--
Data Collection Policy types.
-->
<complexType name="dcpType">
<sequence>
<element name="access" type="epp:dcpAccessType"/>
<element name="statement" type="epp:dcpStatementType"
maxOccurs="unbounded"/>
<element name="expiry" type="epp:dcpExpiryType"
minOccurs="0"/>
</sequence>
</complexType>
<complexType name="dcpAccessType">
<choice>
<element name="all"/>
<element name="none"/>
<element name="null"/>
<element name="other"/>
<element name="personal"/>
<element name="personalAndOther"/>
</choice>
</complexType>
<complexType name="dcpStatementType">
<sequence>
<element name="purpose" type="epp:dcpPurposeType"/>
<element name="recipient" type="epp:dcpRecipientType"/>
<element name="retention" type="epp:dcpRetentionType"/>
</sequence>
</complexType>
<complexType name="dcpPurposeType">
<sequence>
<element name="admin"
minOccurs="0"/>
<element name="contact"
minOccurs="0"/>
<element name="other"
minOccurs="0"/>
<element name="prov"
minOccurs="0"/>
</sequence>
</complexType>
<complexType name="dcpRecipientType">
<sequence>
<element name="other"
minOccurs="0"/>
<element name="ours" type="epp:dcpOursType"
minOccurs="0" maxOccurs="unbounded"/>
<element name="public"
minOccurs="0"/>
<element name="same"
minOccurs="0"/>
<element name="unrelated"
minOccurs="0"/>
</sequence>
</complexType>
<complexType name="dcpOursType">
<sequence>
<element name="recDesc" type="epp:dcpRecDescType"
minOccurs="0"/>
</sequence>
</complexType>
<simpleType name="dcpRecDescType">
<restriction base="token">
<minLength value="1"/>
<maxLength value="255"/>
</restriction>
</simpleType>
<complexType name="dcpRetentionType">
<choice>
<element name="business"/>
<element name="indefinite"/>
<element name="legal"/>
<element name="none"/>
<element name="stated"/>
</choice>
</complexType>
<complexType name="dcpExpiryType">
<choice>
<element name="absolute" type="dateTime"/>
<element name="relative" type="duration"/>
</choice>
</complexType>
<!--
Extension framework types.
-->
<complexType name="extAnyType">
<sequence>
<any namespace="##other"
maxOccurs="unbounded"/>
</sequence>
</complexType>
<complexType name="extURIType">
<sequence>
<element name="extURI" type="anyURI"
maxOccurs="unbounded"/>
</sequence>
</complexType>
<!--
An EPP version number is a dotted pair of decimal numbers.
-->
<simpleType name="versionType">
<restriction base="token">
<pattern value="[1-9]+\.[0-9]+"/>
<enumeration value="1.0"/>
</restriction>
</simpleType>
<!--
Command types.
-->
<complexType name="commandType">
<sequence>
<choice>
<element name="check" type="epp:readWriteType"/>
<element name="create" type="epp:readWriteType"/>
<element name="delete" type="epp:readWriteType"/>
<element name="info" type="epp:readWriteType"/>
<element name="login" type="epp:loginType"/>
<element name="logout"/>
<element name="poll" type="epp:pollType"/>
<element name="renew" type="epp:readWriteType"/>
<element name="transfer" type="epp:transferType"/>
<element name="update" type="epp:readWriteType"/>
</choice>
<element name="extension" type="epp:extAnyType"
minOccurs="0"/>
<element name="clTRID" type="epp:trIDStringType"
minOccurs="0"/>
</sequence>
</complexType>
<!--
The <login> command.
-->
<complexType name="loginType">
<sequence>
<element name="clID" type="eppcom:clIDType"/>
<element name="pw" type="epp:pwType"/>
<element name="newPW" type="epp:pwType"
minOccurs="0"/>
<element name="options" type="epp:credsOptionsType"/>
<element name="svcs" type="epp:loginSvcType"/>
</sequence>
</complexType>
<complexType name="credsOptionsType">
<sequence>
<element name="version" type="epp:versionType"/>
<element name="lang" type="language"/>
</sequence>
</complexType>
<simpleType name="pwType">
<restriction base="token">
<minLength value="6"/>
<maxLength value="16"/>
</restriction>
</simpleType>
<complexType name="loginSvcType">
<sequence>
<element name="objURI" type="anyURI"
maxOccurs="unbounded"/>
<element name="svcExtension" type="epp:extURIType"
minOccurs="0"/>
</sequence>
</complexType>
<!--
The <poll> command.
-->
<complexType name="pollType">
<attribute name="op" type="epp:pollOpType"
use="required"/>
<attribute name="msgID" type="token"/>
</complexType>
<simpleType name="pollOpType">
<restriction base="token">
<enumeration value="ack"/>
<enumeration value="req"/>
</restriction>
</simpleType>
<!--
The <transfer> command. This is object-specific, and uses attributes
to identify the requested operation.
-->
<complexType name="transferType">
<sequence>
<any namespace="##other"/>
</sequence>
<attribute name="op" type="epp:transferOpType"
use="required"/>
</complexType>
<simpleType name="transferOpType">
<restriction base="token">
<enumeration value="approve"/>
<enumeration value="cancel"/>
<enumeration value="query"/>
<enumeration value="reject"/>
<enumeration value="request"/>
</restriction>
</simpleType>
<!--
All other object-centric commands. EPP doesn't specify the syntax or
semantics of object-centric command elements. The elements MUST be
described in detail in another schema specific to the object.
-->
<complexType name="readWriteType">
<sequence>
<any namespace="##other"/>
</sequence>
</complexType>
<complexType name="trIDType">
<sequence>
<element name="clTRID" type="epp:trIDStringType"
minOccurs="0"/>
<element name="svTRID" type="epp:trIDStringType"/>
</sequence>
</complexType>
<simpleType name="trIDStringType">
<restriction base="token">
<minLength value="3"/>
<maxLength value="64"/>
</restriction>
</simpleType>
<!--
Response types.
-->
<complexType name="responseType">
<sequence>
<element name="result" type="epp:resultType"
maxOccurs="unbounded"/>
<element name="msgQ" type="epp:msgQType"
minOccurs="0"/>
<element name="resData" type="epp:extAnyType"
minOccurs="0"/>
<element name="extension" type="epp:extAnyType"
minOccurs="0"/>
<element name="trID" type="epp:trIDType"/>
</sequence>
</complexType>
<complexType name="resultType">
<sequence>
<element name="msg" type="epp:msgType"/>
<choice minOccurs="0" maxOccurs="unbounded">
<element name="value" type="epp:errValueType"/>
<element name="extValue" type="epp:extErrValueType"/>
</choice>
</sequence>
<attribute name="code" type="epp:resultCodeType"
use="required"/>
</complexType>
<complexType name="errValueType" mixed="true">
<sequence>
<any namespace="##any" processContents="skip"/>
</sequence>
<anyAttribute namespace="##any" processContents="skip"/>
</complexType>
<complexType name="extErrValueType">
<sequence>
<element name="value" type="epp:errValueType"/>
<element name="reason" type="epp:msgType"/>
</sequence>
</complexType>
<complexType name="msgQType">
<sequence>
<element name="qDate" type="dateTime"
minOccurs="0"/>
<element name="msg" type="epp:mixedMsgType"
minOccurs="0"/>
</sequence>
<attribute name="count" type="unsignedLong"
use="required"/>
<attribute name="id" type="eppcom:minTokenType"
use="required"/>
</complexType>
<complexType name="mixedMsgType" mixed="true">
<sequence>
<any processContents="skip"
minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="lang" type="language"
default="en"/>
</complexType>
<!--
Human-readable text may be expressed in languages other than English.
-->
<complexType name="msgType">
<simpleContent>
<extension base="normalizedString">
<attribute name="lang" type="language"
default="en"/>
</extension>
</simpleContent>
</complexType>
<!--
EPP result codes.
-->
<simpleType name="resultCodeType">
<restriction base="unsignedShort">
<enumeration value="1000"/>
<enumeration value="1001"/>
<enumeration value="1300"/>
<enumeration value="1301"/>
<enumeration value="1500"/>
<enumeration value="2000"/>
<enumeration value="2001"/>
<enumeration value="2002"/>
<enumeration value="2003"/>
<enumeration value="2004"/>
<enumeration value="2005"/>
<enumeration value="2100"/>
<enumeration value="2101"/>
<enumeration value="2102"/>
<enumeration value="2103"/>
<enumeration value="2104"/>
<enumeration value="2105"/>
<enumeration value="2106"/>
<enumeration value="2200"/>
<enumeration value="2201"/>
<enumeration value="2202"/>
<enumeration value="2300"/>
<enumeration value="2301"/>
<enumeration value="2302"/>
<enumeration value="2303"/>
<enumeration value="2304"/>
<enumeration value="2305"/>
<enumeration value="2306"/>
<enumeration value="2307"/>
<enumeration value="2308"/>
<enumeration value="2400"/>
<enumeration value="2500"/>
<enumeration value="2501"/>
<enumeration value="2502"/>
</restriction>
</simpleType>
<!--
End of schema.
-->
</schema>

105
doc/schemas/eppcom-1.0.xsd Normal file
View file

@ -0,0 +1,105 @@
<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="urn:ietf:params:xml:ns:eppcom-1.0"
xmlns:eppcom="urn:ietf:params:xml:ns:eppcom-1.0"
xmlns="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<annotation>
<documentation>
Extensible Provisioning Protocol v1.0
shared structures schema.
</documentation>
</annotation>
<!--
Object authorization information types.
-->
<complexType name="pwAuthInfoType">
<simpleContent>
<extension base="normalizedString">
<attribute name="roid" type="eppcom:roidType"/>
</extension>
</simpleContent>
</complexType>
<complexType name="extAuthInfoType">
<sequence>
<any namespace="##other"/>
</sequence>
</complexType>
<!--
<check> response types.
-->
<complexType name="reasonType">
<simpleContent>
<extension base="eppcom:reasonBaseType">
<attribute name="lang" type="language"/>
</extension>
</simpleContent>
</complexType>
<simpleType name="reasonBaseType">
<restriction base="token">
<minLength value="1"/>
<maxLength value="32"/>
</restriction>
</simpleType>
<!--
Abstract client and object identifier type.
-->
<simpleType name="clIDType">
<restriction base="token">
<minLength value="3"/>
<maxLength value="16"/>
</restriction>
</simpleType>
<!--
DNS label type.
-->
<simpleType name="labelType">
<restriction base="token">
<minLength value="1"/>
<maxLength value="255"/>
</restriction>
</simpleType>
<!--
Non-empty token type.
-->
<simpleType name="minTokenType">
<restriction base="token">
<minLength value="1"/>
</restriction>
</simpleType>
<!--
Repository Object IDentifier type.
-->
<simpleType name="roidType">
<restriction base="token">
<pattern value="(\w|_){1,80}-\w{1,8}"/>
</restriction>
</simpleType>
<!--
Transfer status identifiers.
-->
<simpleType name="trStatusType">
<restriction base="token">
<enumeration value="clientApproved"/>
<enumeration value="clientCancelled"/>
<enumeration value="clientRejected"/>
<enumeration value="pending"/>
<enumeration value="serverApproved"/>
<enumeration value="serverCancelled"/>
</restriction>
</simpleType>
<!--
End of schema.
-->
</schema>

238
doc/schemas/host-1.0.xsd Normal file
View file

@ -0,0 +1,238 @@
<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="urn:ietf:params:xml:ns:host-1.0"
xmlns:host="urn:ietf:params:xml:ns:host-1.0"
xmlns:epp="urn:ietf:params:xml:ns:epp-1.0"
xmlns:eppcom="urn:ietf:params:xml:ns:eppcom-1.0"
xmlns="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<!--
Import common element types.
-->
<import namespace="urn:ietf:params:xml:ns:eppcom-1.0"/>
<import namespace="urn:ietf:params:xml:ns:epp-1.0"/>
<annotation>
<documentation>
Extensible Provisioning Protocol v1.0
host provisioning schema.
</documentation>
</annotation>
<!--
Child elements found in EPP commands.
-->
<element name="check" type="host:mNameType"/>
<element name="create" type="host:createType"/>
<element name="delete" type="host:sNameType"/>
<element name="info" type="host:sNameType"/>
<element name="update" type="host:updateType"/>
<!--
Child elements of the <create> command.
-->
<complexType name="createType">
<sequence>
<element name="name" type="eppcom:labelType"/>
<element name="addr" type="host:addrType"
minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</complexType>
<complexType name="addrType">
<simpleContent>
<extension base="host:addrStringType">
<attribute name="ip" type="host:ipType"
default="v4"/>
</extension>
</simpleContent>
</complexType>
<simpleType name="addrStringType">
<restriction base="token">
<minLength value="3"/>
<maxLength value="45"/>
</restriction>
</simpleType>
<simpleType name="ipType">
<restriction base="token">
<enumeration value="v4"/>
<enumeration value="v6"/>
</restriction>
</simpleType>
<!--
Child elements of the <delete> and <info> commands.
-->
<complexType name="sNameType">
<sequence>
<element name="name" type="eppcom:labelType"/>
</sequence>
</complexType>
<!--
Child element of commands that accept multiple names.
-->
<complexType name="mNameType">
<sequence>
<element name="name" type="eppcom:labelType"
maxOccurs="unbounded"/>
</sequence>
</complexType>
<!--
Child elements of the <update> command.
-->
<complexType name="updateType">
<sequence>
<element name="name" type="eppcom:labelType"/>
<element name="add" type="host:addRemType"
minOccurs="0"/>
<element name="rem" type="host:addRemType"
minOccurs="0"/>
<element name="chg" type="host:chgType"
minOccurs="0"/>
</sequence>
</complexType>
<!--
Data elements that can be added or removed.
-->
<complexType name="addRemType">
<sequence>
<element name="addr" type="host:addrType"
minOccurs="0" maxOccurs="unbounded"/>
<element name="status" type="host:statusType"
minOccurs="0" maxOccurs="7"/>
</sequence>
</complexType>
<!--
Data elements that can be changed.
-->
<complexType name="chgType">
<sequence>
<element name="name" type="eppcom:labelType"/>
</sequence>
</complexType>
<!--
Child response elements.
-->
<element name="chkData" type="host:chkDataType"/>
<element name="creData" type="host:creDataType"/>
<element name="infData" type="host:infDataType"/>
<element name="panData" type="host:panDataType"/>
<!--
<check> response elements.
-->
<complexType name="chkDataType">
<sequence>
<element name="cd" type="host:checkType"
maxOccurs="unbounded"/>
</sequence>
</complexType>
<complexType name="checkType">
<sequence>
<element name="name" type="host:checkNameType"/>
<element name="reason" type="eppcom:reasonType"
minOccurs="0"/>
</sequence>
</complexType>
<complexType name="checkNameType">
<simpleContent>
<extension base="eppcom:labelType">
<attribute name="avail" type="boolean"
use="required"/>
</extension>
</simpleContent>
</complexType>
<!--
<create> response elements.
-->
<complexType name="creDataType">
<sequence>
<element name="name" type="eppcom:labelType"/>
<element name="crDate" type="dateTime"/>
</sequence>
</complexType>
<!--
<info> response elements.
-->
<complexType name="infDataType">
<sequence>
<element name="name" type="eppcom:labelType"/>
<element name="roid" type="eppcom:roidType"/>
<element name="status" type="host:statusType"
maxOccurs="7"/>
<element name="addr" type="host:addrType"
minOccurs="0" maxOccurs="unbounded"/>
<element name="clID" type="eppcom:clIDType"/>
<element name="crID" type="eppcom:clIDType"/>
<element name="crDate" type="dateTime"/>
<element name="upID" type="eppcom:clIDType"
minOccurs="0"/>
<element name="upDate" type="dateTime"
minOccurs="0"/>
<element name="trDate" type="dateTime"
minOccurs="0"/>
</sequence>
</complexType>
<!--
Status is a combination of attributes and an optional human-readable
message that may be expressed in languages other than English.
-->
<complexType name="statusType">
<simpleContent>
<extension base="normalizedString">
<attribute name="s" type="host:statusValueType"
use="required"/>
<attribute name="lang" type="language"
default="en"/>
</extension>
</simpleContent>
</complexType>
<simpleType name="statusValueType">
<restriction base="token">
<enumeration value="clientDeleteProhibited"/>
<enumeration value="clientUpdateProhibited"/>
<enumeration value="linked"/>
<enumeration value="ok"/>
<enumeration value="pendingCreate"/>
<enumeration value="pendingDelete"/>
<enumeration value="pendingTransfer"/>
<enumeration value="pendingUpdate"/>
<enumeration value="serverDeleteProhibited"/>
<enumeration value="serverUpdateProhibited"/>
</restriction>
</simpleType>
<!--
Pending action notification response elements.
-->
<complexType name="panDataType">
<sequence>
<element name="name" type="host:paNameType"/>
<element name="paTRID" type="epp:trIDType"/>
<element name="paDate" type="dateTime"/>
</sequence>
</complexType>
<complexType name="paNameType">
<simpleContent>
<extension base="eppcom:labelType">
<attribute name="paResult" type="boolean"
use="required"/>
</extension>
</simpleContent>
</complexType>
<!--
End of schema.
-->
</schema>

134
doc/schemas/secDNS-1.1.xsd Normal file
View file

@ -0,0 +1,134 @@
<?xml version="1.0" encoding="UTF-8"?>
<schema
targetNamespace="urn:ietf:params:xml:ns:secDNS-1.1"
xmlns:secDNS="urn:ietf:params:xml:ns:secDNS-1.1"
xmlns="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<annotation>
<documentation>
Extensible Provisioning Protocol v1.0
domain name extension schema
for provisioning DNS security (DNSSEC) extensions.
</documentation>
</annotation>
<!--
Child elements found in EPP commands.
-->
<element name="create" type="secDNS:dsOrKeyType"/>
<element name="update" type="secDNS:updateType"/>
<!--
Child elements supporting either the
dsData or the keyData interface.
-->
<complexType name="dsOrKeyType">
<sequence>
<element name="maxSigLife" type="secDNS:maxSigLifeType"
minOccurs="0"/>
<choice>
<element name="dsData" type="secDNS:dsDataType"
maxOccurs="unbounded"/>
<element name="keyData" type="secDNS:keyDataType"
maxOccurs="unbounded"/>
</choice>
</sequence>
</complexType>
<!--
Definition for the maximum signature life (maxSigLife)
-->
<simpleType name="maxSigLifeType">
<restriction base="int">
<minInclusive value="1"/>
</restriction>
</simpleType>
<!--
Child elements of dsData used for dsData interface
-->
<complexType name="dsDataType">
<sequence>
<element name="keyTag" type="unsignedShort"/>
<element name="alg" type="unsignedByte"/>
<element name="digestType" type="unsignedByte"/>
<element name="digest" type="hexBinary"/>
<element name="keyData" type="secDNS:keyDataType"
minOccurs="0"/>
</sequence>
</complexType>
<!--
Child elements of keyData used for keyData interface
and optionally with dsData interface
-->
<complexType name="keyDataType">
<sequence>
<element name="flags" type="unsignedShort"/>
<element name="protocol" type="unsignedByte"/>
<element name="alg" type="unsignedByte"/>
<element name="pubKey" type="secDNS:keyType"/>
</sequence>
</complexType>
<!--
Definition for the public key
-->
<simpleType name="keyType">
<restriction base="base64Binary">
<minLength value="1"/>
</restriction>
</simpleType>
<!--
Child elements of the <update> element.
-->
<complexType name="updateType">
<sequence>
<element name="rem" type="secDNS:remType"
minOccurs="0"/>
<element name="add" type="secDNS:dsOrKeyType"
minOccurs="0"/>
<element name="chg" type="secDNS:chgType"
minOccurs="0"/>
</sequence>
<attribute name="urgent" type="boolean" default="false"/>
</complexType>
<!--
Child elements of the <rem> command.
-->
<complexType name="remType">
<choice>
<element name="all" type="boolean"/>
<element name="dsData" type="secDNS:dsDataType"
maxOccurs="unbounded"/>
<element name="keyData" type="secDNS:keyDataType"
maxOccurs="unbounded"/>
</choice>
</complexType>
<!--
Child elements supporting the <chg> element.
-->
<complexType name="chgType">
<sequence>
<element name="maxSigLife" type="secDNS:maxSigLifeType"
minOccurs="0"/>
</sequence>
</complexType>
<!--
Child response elements.
-->
<element name="infData" type="secDNS:dsOrKeyType"/>
</schema>

View file

@ -148,11 +148,11 @@ namespace :import do
email email
fax fax
created_at created_at
updated_at
ident ident
ident_type ident_type
auth_info auth_info
name name
org_name
registrar_id registrar_id
creator_str creator_str
updator_str updator_str
@ -163,11 +163,11 @@ namespace :import do
zip zip
state state
country_code country_code
statuses
) )
contacts = [] contacts = []
existing_contact_ids = Contact.pluck(:legacy_id) existing_contact_ids = Contact.pluck(:legacy_id)
user = "rake-#{`whoami`.strip} #{ARGV.join ' '}"
count = 0 count = 0
Legacy::Contact.includes(:object_registry, :object, object_registry: :registrar) Legacy::Contact.includes(:object_registry, :object, object_registry: :registrar)
@ -181,28 +181,29 @@ namespace :import do
contacts << [ contacts << [
x.object_registry.name.try(:strip), x.object_registry.name.try(:strip),
x.telephone.try(:strip), x.telephone.try(:strip),
x.email.try(:strip), [x.email.try(:strip), x.notifyemail.try(:strip)].uniq.select(&:present?).join(', '),
x.fax.try(:strip), x.fax.try(:strip),
x.object_registry.try(:crdate), x.object_registry.try(:crdate),
x.object.read_attribute(:update).nil? ? x.object_registry.try(:crdate) : x.object.read_attribute(:update),
x.ssn.try(:strip), x.ssn.try(:strip),
ident_type_map[x.ssntype], ident_type_map[x.ssntype],
x.object.authinfopw.try(:strip), x.object.authinfopw.try(:strip),
name, x.organization.try(:strip)? x.organization.try(:strip): name,
x.organization.try(:strip), Registrar.find_by(legacy_id: x.object.try(:clid)).try(:id),
x.object_registry.try(:registrar).try(:id), x.object_registry.try(:registrar).try(:name),
user, x.object.try(:registrar).try(:name) ? x.object.try(:registrar).try(:name) : x.object_registry.try(:registrar).try(:name),
user,
x.country.try(:strip), x.country.try(:strip),
x.id, x.id,
[x.street1.try(:strip), x.street2.try(:strip), x.street3.try(:strip)].join("\n"), [x.street1.try(:strip), x.street2.try(:strip), x.street3.try(:strip)].join("\n"),
x.city.try(:strip), x.city.try(:strip),
x.postalcode.try(:strip), x.postalcode.try(:strip),
x.stateorprovince.try(:strip), x.stateorprovince.try(:strip),
x.country.try(:strip) x.country.try(:strip),
[x.object_state.try(:name)|| Contact::OK]
] ]
if contacts.size % 10000 == 0 if contacts.size % 10000 == 0
Contact.import contact_columns, contacts, validate: false Contact.import contact_columns, contacts, {validate: false, timestamps: false}
contacts = [] contacts = []
end end
rescue => e rescue => e
@ -211,7 +212,7 @@ namespace :import do
end end
end end
Contact.import contact_columns, contacts, validate: false Contact.import contact_columns, contacts, {validate: false, timestamps: false}
puts "-----> Imported #{count} new contacts in #{(Time.zone.now.to_f - start).round(2)} seconds" puts "-----> Imported #{count} new contacts in #{(Time.zone.now.to_f - start).round(2)} seconds"
end end
@ -222,11 +223,13 @@ namespace :import do
domain_columns = %w( domain_columns = %w(
name name
registrar_id
registered_at registered_at
valid_from valid_from
valid_to valid_to
auth_info auth_info
created_at created_at
updated_at
name_dirty name_dirty
name_puny name_puny
period period
@ -264,6 +267,8 @@ namespace :import do
creator_str creator_str
updator_str updator_str
legacy_domain_id legacy_domain_id
created_at
updated_at
) )
dnskey_columns = %w( dnskey_columns = %w(
@ -276,6 +281,7 @@ namespace :import do
creator_str creator_str
updator_str updator_str
legacy_domain_id legacy_domain_id
updated_at
) )
domains, nameservers, dnskeys, domain_contacts = [], [], [], [] domains, nameservers, dnskeys, domain_contacts = [], [], [], []
@ -298,29 +304,29 @@ namespace :import do
begin begin
# domain statuses # domain statuses
domain_statuses = [] domain_statuses = []
ok = true
x.object_states.each do |state| x.object_states.each do |state|
next if state.name.blank? next if state.name.blank?
domain_statuses << state.name domain_statuses << state.name
ok = false
end end
# OK status is default # OK status is default
domain_statuses << DomainStatus::OK if ok domain_statuses << DomainStatus::OK if domain_statuses.empty?
domains << [ domains << [
x.object_registry.name.try(:strip), x.object_registry.name.try(:strip),
Registrar.find_by(legacy_id: x.object.try(:clid)).try(:id),
x.object_registry.try(:crdate), x.object_registry.try(:crdate),
x.object_registry.try(:crdate), x.object_registry.try(:crdate),
x.exdate, x.exdate,
x.object.authinfopw.try(:strip), x.object.authinfopw.try(:strip),
x.object_registry.try(:crdate), x.object_registry.try(:crdate),
x.object.read_attribute(:update).nil? ? x.object_registry.try(:crdate) : x.object.read_attribute(:update),
x.object_registry.name.try(:strip), x.object_registry.name.try(:strip),
SimpleIDN.to_ascii(x.object_registry.name.try(:strip)), SimpleIDN.to_ascii(x.object_registry.name.try(:strip)),
1, 1,
'y', 'y',
user, x.object_registry.try(:registrar).try(:name),
user, x.object.try(:registrar).try(:name) ? x.object.try(:registrar).try(:name) : x.object_registry.try(:registrar).try(:name),
x.id, x.id,
x.object_registry.try(:crid), x.object_registry.try(:crid),
x.registrant, x.registrant,
@ -331,8 +337,8 @@ namespace :import do
x.domain_contact_maps.each do |dc| x.domain_contact_maps.each do |dc|
domain_contacts << [ domain_contacts << [
'AdminDomainContact', 'AdminDomainContact',
user, x.object_registry.try(:registrar).try(:name),
user, x.object.try(:registrar).try(:name) ? x.object.try(:registrar).try(:name) : x.object_registry.try(:registrar).try(:name),
x.id, x.id,
dc.contactid dc.contactid
] ]
@ -342,15 +348,16 @@ namespace :import do
x.nsset_contact_maps.each do |dc| x.nsset_contact_maps.each do |dc|
domain_contacts << [ domain_contacts << [
'TechDomainContact', 'TechDomainContact',
user, x.object_registry.try(:registrar).try(:name),
user, x.object.try(:registrar).try(:name) ? x.object.try(:registrar).try(:name) : x.object_registry.try(:registrar).try(:name),
x.id, x.id,
dc.contactid dc.contactid
] ]
end end
# nameservers # nameservers
x.nsset.hosts.each do |host| nsset = x.nsset
nsset.hosts.each do |host|
ip_maps = host.host_ipaddr_maps ip_maps = host.host_ipaddr_maps
ips = {} ips = {}
ip_maps.each do |ip_map| ip_maps.each do |ip_map|
@ -363,9 +370,11 @@ namespace :import do
host.fqdn.try(:strip), host.fqdn.try(:strip),
ips[:ipv4].try(:strip), ips[:ipv4].try(:strip),
ips[:ipv6].try(:strip), ips[:ipv6].try(:strip),
user, x.object_registry.try(:registrar).try(:name),
user, x.object.try(:registrar).try(:name) ? x.object.try(:registrar).try(:name) : x.object_registry.try(:registrar).try(:name),
x.id x.id,
nsset.object_registry.try(:crdate),
nsset.object.read_attribute(:update).nil? ? x.object_registry.try(:crdate) : x.object.read_attribute(:update)
] ]
end if x.nsset && x.nsset.hosts end if x.nsset && x.nsset.hosts
@ -377,17 +386,18 @@ namespace :import do
key.key, key.key,
3, # ds_alg 3, # ds_alg
1, # ds_digest_type /SHA1) 1, # ds_digest_type /SHA1)
user, x.object_registry.try(:registrar).try(:name),
user, x.object.try(:registrar).try(:name) ? x.object.try(:registrar).try(:name) : x.object_registry.try(:registrar).try(:name),
x.id x.id,
key.object.read_attribute(:update).nil? ? x.object_registry.try(:crdate) : x.object.read_attribute(:update)
] ]
end end
if index % 10000 == 0 && index != 0 if index % 10000 == 0 && index != 0
Domain.import domain_columns, domains, validate: false Domain.import domain_columns, domains, {validate: false, timestamps: false}
Nameserver.import nameserver_columns, nameservers, validate: false Nameserver.import nameserver_columns, nameservers, {validate: false, timestamps: false}
Dnskey.import dnskey_columns, dnskeys, validate: false Dnskey.import dnskey_columns, dnskeys, {validate: false, timestamps: false}
DomainContact.import domain_contact_columns, domain_contacts, validate: false DomainContact.import domain_contact_columns, domain_contacts, validate: false # created_at is taken from contact at the bottom
domains, nameservers, dnskeys, domain_contacts = [], [], [], [] domains, nameservers, dnskeys, domain_contacts = [], [], [], []
end end
rescue => e rescue => e
@ -396,9 +406,9 @@ namespace :import do
end end
end end
Domain.import domain_columns, domains, validate: false Domain.import domain_columns, domains, {validate: false, timestamps: false}
Nameserver.import nameserver_columns, nameservers, validate: false Nameserver.import nameserver_columns, nameservers, {validate: false, timestamps: false}
Dnskey.import dnskey_columns, dnskeys, validate: false Dnskey.import dnskey_columns, dnskeys, {validate: false, timestamps: false}
DomainContact.import domain_contact_columns, domain_contacts, validate: false DomainContact.import domain_contact_columns, domain_contacts, validate: false
puts '-----> Updating relations...' puts '-----> Updating relations...'
@ -426,7 +436,9 @@ namespace :import do
# contacts # contacts
ActiveRecord::Base.connection.execute( ActiveRecord::Base.connection.execute(
"UPDATE domain_contacts "\ "UPDATE domain_contacts "\
"SET contact_id = contacts.id "\ "SET contact_id = contacts.id, "\
"updated_at = contacts.updated_at, "\
"created_at = contacts.created_at "\
"FROM contacts "\ "FROM contacts "\
"WHERE contacts.legacy_id = legacy_contact_id "\ "WHERE contacts.legacy_id = legacy_contact_id "\
"AND legacy_contact_id IS NOT NULL "\ "AND legacy_contact_id IS NOT NULL "\

View file

@ -17,7 +17,7 @@ task statuses: [:environment] do
'serverRegistrantChangeProhibited', 'serverRegistrantChangeProhibited',
'serverAdminChangeProhibited', 'serverAdminChangeProhibited',
'serverTechChangeProhibited', 'serverTechChangeProhibited',
'forceDelete', 'serverForceDelete',
'deleteCandidate', 'deleteCandidate',
'expired' 'expired'
], ],
@ -36,7 +36,7 @@ task statuses: [:environment] do
'serverRegistrantChangeProhibited', 'serverRegistrantChangeProhibited',
'serverAdminChangeProhibited', 'serverAdminChangeProhibited',
'serverTechChangeProhibited', 'serverTechChangeProhibited',
'forceDelete', 'serverForceDelete',
'deleteCandidate', 'deleteCandidate',
'expired' 'expired'
], ],
@ -55,7 +55,7 @@ task statuses: [:environment] do
'serverRegistrantChangeProhibited', 'serverRegistrantChangeProhibited',
'serverAdminChangeProhibited', 'serverAdminChangeProhibited',
'serverTechChangeProhibited', 'serverTechChangeProhibited',
'forceDelete', 'serverForceDelete',
'deleteCandidate', 'deleteCandidate',
'expired' 'expired'
], ],
@ -73,7 +73,7 @@ task statuses: [:environment] do
'serverRegistrantChangeProhibited', 'serverRegistrantChangeProhibited',
'serverAdminChangeProhibited', 'serverAdminChangeProhibited',
'serverTechChangeProhibited', 'serverTechChangeProhibited',
'forceDelete', 'serverForceDelete',
'deleteCandidate', 'deleteCandidate',
'expired' 'expired'
], ],
@ -91,7 +91,7 @@ task statuses: [:environment] do
'serverRegistrantChangeProhibited', 'serverRegistrantChangeProhibited',
'serverAdminChangeProhibited', 'serverAdminChangeProhibited',
'serverTechChangeProhibited', 'serverTechChangeProhibited',
'forceDelete', 'serverForceDelete',
'deleteCandidate', 'deleteCandidate',
'expired' 'expired'
], ],
@ -115,7 +115,7 @@ task statuses: [:environment] do
'serverRegistrantChangeProhibited', 'serverRegistrantChangeProhibited',
'serverAdminChangeProhibited', 'serverAdminChangeProhibited',
'serverTechChangeProhibited', 'serverTechChangeProhibited',
'forceDelete', 'serverForceDelete',
'deleteCandidate', 'deleteCandidate',
'expired' 'expired'
], ],
@ -139,7 +139,7 @@ task statuses: [:environment] do
'serverRegistrantChangeProhibited', 'serverRegistrantChangeProhibited',
'serverAdminChangeProhibited', 'serverAdminChangeProhibited',
'serverTechChangeProhibited', 'serverTechChangeProhibited',
'forceDelete', 'serverForceDelete',
'deleteCandidate', 'deleteCandidate',
'expired' 'expired'
], ],
@ -163,7 +163,7 @@ task statuses: [:environment] do
'serverRegistrantChangeProhibited', 'serverRegistrantChangeProhibited',
'serverAdminChangeProhibited', 'serverAdminChangeProhibited',
'serverTechChangeProhibited', 'serverTechChangeProhibited',
'forceDelete', 'serverForceDelete',
'deleteCandidate', 'deleteCandidate',
'expired' 'expired'
], ],
@ -187,7 +187,7 @@ task statuses: [:environment] do
'serverRegistrantChangeProhibited', 'serverRegistrantChangeProhibited',
'serverAdminChangeProhibited', 'serverAdminChangeProhibited',
'serverTechChangeProhibited', 'serverTechChangeProhibited',
'forceDelete', 'serverForceDelete',
'deleteCandidate', 'deleteCandidate',
'expired' 'expired'
], ],
@ -211,7 +211,7 @@ task statuses: [:environment] do
'serverRegistrantChangeProhibited', 'serverRegistrantChangeProhibited',
'serverAdminChangeProhibited', 'serverAdminChangeProhibited',
'serverTechChangeProhibited', 'serverTechChangeProhibited',
'forceDelete', 'serverForceDelete',
'deleteCandidate', 'deleteCandidate',
'expired' 'expired'
], ],
@ -235,7 +235,7 @@ task statuses: [:environment] do
'serverRegistrantChangeProhibited', 'serverRegistrantChangeProhibited',
'serverAdminChangeProhibited', 'serverAdminChangeProhibited',
'serverTechChangeProhibited', 'serverTechChangeProhibited',
'forceDelete', 'serverForceDelete',
'deleteCandidate', 'deleteCandidate',
'expired' 'expired'
], ],
@ -255,7 +255,7 @@ task statuses: [:environment] do
'serverRegistrantChangeProhibited', 'serverRegistrantChangeProhibited',
'serverAdminChangeProhibited', 'serverAdminChangeProhibited',
'serverTechChangeProhibited', 'serverTechChangeProhibited',
'forceDelete', 'serverForceDelete',
'deleteCandidate', 'deleteCandidate',
'expired' 'expired'
], ],
@ -274,7 +274,7 @@ task statuses: [:environment] do
'serverRegistrantChangeProhibited', 'serverRegistrantChangeProhibited',
'serverAdminChangeProhibited', 'serverAdminChangeProhibited',
'serverTechChangeProhibited', 'serverTechChangeProhibited',
'forceDelete', 'serverForceDelete',
'deleteCandidate', 'deleteCandidate',
'expired' 'expired'
], ],
@ -292,7 +292,7 @@ task statuses: [:environment] do
'serverRegistrantChangeProhibited', 'serverRegistrantChangeProhibited',
'serverAdminChangeProhibited', 'serverAdminChangeProhibited',
'serverTechChangeProhibited', 'serverTechChangeProhibited',
'forceDelete', 'serverForceDelete',
'deleteCandidate', 'deleteCandidate',
'expired' 'expired'
@ -311,7 +311,7 @@ task statuses: [:environment] do
'serverRegistrantChangeProhibited', 'serverRegistrantChangeProhibited',
'serverAdminChangeProhibited', 'serverAdminChangeProhibited',
'serverTechChangeProhibited', 'serverTechChangeProhibited',
'forceDelete', 'serverForceDelete',
'deleteCandidate', 'deleteCandidate',
'expired' 'expired'
], ],
@ -329,7 +329,7 @@ task statuses: [:environment] do
'serverRegistrantChangeProhibited', 'serverRegistrantChangeProhibited',
'serverAdminChangeProhibited', 'serverAdminChangeProhibited',
'serverTechChangeProhibited', 'serverTechChangeProhibited',
'forceDelete', 'serverForceDelete',
'deleteCandidate', 'deleteCandidate',
'expired' 'expired'
], ],
@ -353,7 +353,7 @@ task statuses: [:environment] do
'serverRegistrantChangeProhibited', 'serverRegistrantChangeProhibited',
'serverAdminChangeProhibited', 'serverAdminChangeProhibited',
'serverTechChangeProhibited', 'serverTechChangeProhibited',
'forceDelete', 'serverForceDelete',
'deleteCandidate', 'deleteCandidate',
'expired' 'expired'
], ],
@ -378,7 +378,7 @@ task statuses: [:environment] do
'serverManualInzone', 'serverManualInzone',
'serverAdminChangeProhibited', 'serverAdminChangeProhibited',
'serverTechChangeProhibited', 'serverTechChangeProhibited',
'forceDelete', 'serverForceDelete',
'deleteCandidate', 'deleteCandidate',
'expired' 'expired'
], ],
@ -403,7 +403,7 @@ task statuses: [:environment] do
'serverManualInzone', 'serverManualInzone',
'serverRegistrantChangeProhibited', 'serverRegistrantChangeProhibited',
'serverTechChangeProhibited', 'serverTechChangeProhibited',
'forceDelete', 'serverForceDelete',
'deleteCandidate', 'deleteCandidate',
'expired' 'expired'
], ],
@ -428,11 +428,11 @@ task statuses: [:environment] do
'serverManualInzone', 'serverManualInzone',
'serverRegistrantChangeProhibited', 'serverRegistrantChangeProhibited',
'serverAdminChangeProhibited', 'serverAdminChangeProhibited',
'forceDelete', 'serverForceDelete',
'deleteCandidate', 'deleteCandidate',
'expired' 'expired'
], ],
'forceDelete': [ 'serverForceDelete': [
'clientHold', 'clientHold',
'serverHold', 'serverHold',
'inactive', 'inactive',
@ -465,7 +465,7 @@ task statuses: [:environment] do
'serverRegistrantChangeProhibited', 'serverRegistrantChangeProhibited',
'serverAdminChangeProhibited', 'serverAdminChangeProhibited',
'serverTechChangeProhibited', 'serverTechChangeProhibited',
'forceDelete', 'serverForceDelete',
'deleteCandidate', 'deleteCandidate',
'expired' 'expired'
], ],
@ -491,7 +491,7 @@ task statuses: [:environment] do
'serverRegistrantChangeProhibited', 'serverRegistrantChangeProhibited',
'serverAdminChangeProhibited', 'serverAdminChangeProhibited',
'serverTechChangeProhibited', 'serverTechChangeProhibited',
'forceDelete', 'serverForceDelete',
'deleteCandidate' 'deleteCandidate'
] ]
} }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,19 @@
(function() {
$(document).on('page:change', function() {
$('.selectize').selectize({
allowEmptyOption: true
});
$('.js-datepicker').datepicker({
showAnim: "",
autoclose: true,
dateFormat: "dd.mm.yy",
changeMonth: true,
changeYear: true
});
$('form').each(function() {
return $(this).validate();
});
return $('[data-toggle="popover"]').popover();
});
}).call(this);

View file

@ -1 +1,19 @@
(function(){$(document).on("page:change",function(){return $(".selectize").selectize({allowEmptyOption:!0}),$(".js-datepicker").datepicker({showAnim:"",autoclose:!0,dateFormat:"dd.mm.yy",changeMonth:!0,changeYear:!0}),$("form").each(function(){return $(this).validate()})})}).call(this); (function() {
$(document).on('page:change', function() {
$('.selectize').selectize({
allowEmptyOption: true
});
$('.js-datepicker').datepicker({
showAnim: "",
autoclose: true,
dateFormat: "dd.mm.yy",
changeMonth: true,
changeYear: true
});
$('form').each(function() {
return $(this).validate();
});
return $('[data-toggle="popover"]').popover();
});
}).call(this);

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,34 @@
(function() {
$(document).on('page:change', function() {
$('form').each(function() {
return $(this).validate();
});
$('.js-contact-form').on('restoreDefault', function(e) {
var form;
form = $(e.target);
form.find('.js-ident-tip').hide();
switch ($('.js-ident-country-code option:selected').val()) {
case 'EE':
return $('.js-ident-type').find('option[value=birthday]').prop('disabled', true);
default:
return $('.js-ident-type').find('option[value=birthday]').prop('disabled', false);
}
});
$('.js-ident-country-code').change(function(e) {
var form;
form = $('.js-contact-form');
return form.trigger('restoreDefault');
});
$('.js-ident-type').change(function(e) {
var form;
form = $('.js-contact-form');
form.trigger('restoreDefault');
switch (e.target.value) {
case 'birthday':
return form.find('.js-ident-tip').show();
}
});
return $('.js-contact-form').trigger('restoreDefault');
});
}).call(this);

View file

@ -1 +1,34 @@
(function(){$(document).on("page:change",function(){return $("form").each(function(){return $(this).validate()}),$(".js-contact-form").on("restoreDefault",function(t){var e;switch(e=$(t.target),e.find(".js-ident-tip").hide(),$(".js-ident-country-code option:selected").val()){case"EE":return $(".js-ident-type").find("option[value=birthday]").prop("disabled",!0);default:return $(".js-ident-type").find("option[value=birthday]").prop("disabled",!1)}}),$(".js-ident-country-code").change(function(){var t;return t=$(".js-contact-form"),t.trigger("restoreDefault")}),$(".js-ident-type").change(function(t){var e;switch(e=$(".js-contact-form"),e.trigger("restoreDefault"),t.target.value){case"birthday":return e.find(".js-ident-tip").show()}}),$(".js-contact-form").trigger("restoreDefault")})}).call(this); (function() {
$(document).on('page:change', function() {
$('form').each(function() {
return $(this).validate();
});
$('.js-contact-form').on('restoreDefault', function(e) {
var form;
form = $(e.target);
form.find('.js-ident-tip').hide();
switch ($('.js-ident-country-code option:selected').val()) {
case 'EE':
return $('.js-ident-type').find('option[value=birthday]').prop('disabled', true);
default:
return $('.js-ident-type').find('option[value=birthday]').prop('disabled', false);
}
});
$('.js-ident-country-code').change(function(e) {
var form;
form = $('.js-contact-form');
return form.trigger('restoreDefault');
});
$('.js-ident-type').change(function(e) {
var form;
form = $('.js-contact-form');
form.trigger('restoreDefault');
switch (e.target.value) {
case 'birthday':
return form.find('.js-ident-tip').show();
}
});
return $('.js-contact-form').trigger('restoreDefault');
});
}).call(this);

File diff suppressed because one or more lines are too long

View file

@ -59,7 +59,7 @@ feature 'Domain', type: :feature do
click_link 'Edit statuses' click_link 'Edit statuses'
page.should have_content('ok') page.should have_content('ok')
click_link 'Set force delete' click_link 'Set force delete'
page.should have_content('forceDelete') page.should have_content('serverForceDelete')
page.should have_content('serverRenewProhibited') page.should have_content('serverRenewProhibited')
page.should have_content('serverTransferProhibited') page.should have_content('serverTransferProhibited')
page.should have_content('serverUpdateProhibited') page.should have_content('serverUpdateProhibited')
@ -74,7 +74,7 @@ feature 'Domain', type: :feature do
click_link 'Back to domain' click_link 'Back to domain'
click_link 'Edit statuses' click_link 'Edit statuses'
click_link 'Unset force delete' click_link 'Unset force delete'
page.should_not have_content('forceDelete') page.should_not have_content('serverForceDelete')
page.should_not have_content('serverRenewProhibited') page.should_not have_content('serverRenewProhibited')
page.should_not have_content('serverTransferProhibited') page.should_not have_content('serverTransferProhibited')
page.should_not have_content('serverUpdateProhibited') page.should_not have_content('serverUpdateProhibited')

View file

@ -245,7 +245,7 @@ describe Domain do
@domain.set_force_delete @domain.set_force_delete
@domain.statuses.should match_array([ @domain.statuses.should match_array([
"forceDelete", "serverForceDelete",
"pendingDelete", "pendingDelete",
"serverManualInzone", "serverManualInzone",
"serverRenewProhibited", "serverRenewProhibited",
@ -286,7 +286,7 @@ describe Domain do
"clientHold", "clientHold",
"deleteCandidate", "deleteCandidate",
"expired", "expired",
"forceDelete", "serverForceDelete",
"pendingDelete", "pendingDelete",
"serverHold", "serverHold",
"serverRenewProhibited", "serverRenewProhibited",