Merge branch 'master' into 115693873-whodunnit_empty

This commit is contained in:
Stas Paaslane 2016-08-12 16:56:40 +03:00
commit e23b5fc9cf
125 changed files with 2167 additions and 714 deletions

View file

@ -1,3 +1,70 @@
9.08.2016
* Admin interface:
* actions are now clickable in domain and contact history and return the initial epp request sent to registry (117806281)
* access to archived domain and contact objects under settings (108869472)
* BUG: noaccess fixed for contacts with incomplete ident data (120093749)
* Registry:
* BUG: adding contact do a domain generated unnecessary log records (116761157)
* linked state for a contact is now dynamic (116761157)
* Portal for registrars:
* improved dnssec data presentation in ds data interface mode (118007975)
* BUG: now all the ident data is returned for contacts with incomplete set (120093749)
* EPP
* BUG: invalid error 2304 "Object status prohibits operation" (118822101)
* BUG: invalid error 2302 "Nameserver already exists on this domain" (118822101)
14.07.2016
* Registry:
* whois records generation fix in contact.rb model (#117612931)
* english translation fix for pending_update_notification_for_new_registrant automated registrant message
16.06.2016
* EPP
* BUG: XML syntax error for poll and logout if optional clTRID is missing (#121580929)
* support for glue records with ipv6 addresses only (#120095555)
15.06.2016
* Portal for registrants
* Notice on login screen on limited access to Estonian electronic IDs (#120182999)
* Admin interface:
* epp log view has now reference to the object name for better usability (#118912395)
* BUG: dnssec data missing from domain history view (#115762063)
* BUG: internal error in doamin history view in case some contact has been deleted (#118300251)
* Registry:
* all values sent over epp are now trimmed of beginning and trailing spaces (#117690107)
* typo and form fixes for automated e-mail messages sent to domain contacts
* EPP:
* BUG: error 2005 on adding IDN nameservers (#114677695)
* BUG: nameserver lable maximum 63 char length validation handled inproperly (#114677695) - support currently limited to Estonian IDN characters.
* BUG: validation passes out of range ident_type values - now limited to org, priv and birthday (#111601356)
* BUG: internal error on hello (#120828283)
* BUG: internal error broken incoming frame (#121580929)
* Deploy:
* BUG: incorrect version in commit message on deploy - config/deploy-example.rb (#120259603)
20.05.2016
* Portal for registrars
* domain details view new displays contact name in addition to ID (#117226457)
* added an option to set veryfied = "yes" parameter to GUI for registrant change and domain delete opertions (#116209751)
* Admin interface
* BUG: fixed number of sorting issues on different views (#117350717)
* BUG: internal error on filtered list sorting (#115043065)
* BUG: account activities csv export messes up registrars (#117702653)
* usability fixes to history view (#115762063)
* Registry
* epp-xml gem reference updated to v 1.0.5 (#116209751)
* epp-xml gem is now taken from local repo https://github.com/internetee/epp-xml/blob/master, the version in RubyGems is not updated any more (#116209751)
* BUG: domains set to force delete were deleted a day ahead of time (#117131083)
* BUG: QUE - undefined method `code' for nil:NilClass - if contact is removed before Que gets to it (#117612061)
* BUG: Que - uninitialized constant RegenerateWhoisRecordJob (#117986917)
* EPP
* BUG: poll message on domain delete does not validate against .ee xml schemas (#118827261)
* BUG: internal error on domain delete (#118159567)
* RestWHOIS
* BUG: statuses not in array for not registered reserved and blocked domains (#118911315)
...
21.09.2015 21.09.2015
* eis-1.0.xsd schema file updated without a new version, please publish a new updated schema file to public. * eis-1.0.xsd schema file updated without a new version, please publish a new updated schema file to public.

View file

@ -31,7 +31,7 @@ gem 'rails-settings-cached', '0.4.1' # for settings
# html-xml # html-xml
gem 'haml-rails', '0.9.0' # haml for views gem 'haml-rails', '0.9.0' # haml for views
gem 'nokogiri', '1.6.7.2' # For XML parsing gem 'nokogiri', '1.6.8' # For XML parsing
# style # style
gem 'sass-rails', '5.0.3' # sass style gem 'sass-rails', '5.0.3' # sass style
@ -88,7 +88,7 @@ gem 'digidoc_client', '0.2.1'
# epp # epp
gem 'epp', '1.4.2', github: 'internetee/epp' gem 'epp', '1.4.2', github: 'internetee/epp'
gem 'epp-xml', '1.0.4' # EIS EPP XMLs gem 'epp-xml', '1.0.5', github: 'internetee/epp-xml' # EIS EPP XMLs
gem 'uuidtools', '2.1.5' # For unique IDs (used by the epp gem) gem 'uuidtools', '2.1.5' # For unique IDs (used by the epp gem)
# que # que

View file

@ -16,6 +16,14 @@ GIT
data_migrate (1.3.0) data_migrate (1.3.0)
rails (>= 4.1.0) rails (>= 4.1.0)
GIT
remote: https://github.com/internetee/epp-xml.git
revision: 475f650951f2cf5015e00d48f408a2194ecc1662
specs:
epp-xml (1.0.5)
activesupport (~> 4.1)
builder (~> 3.2)
GIT GIT
remote: https://github.com/internetee/epp.git remote: https://github.com/internetee/epp.git
revision: 505c3f2739eb1da918e54111aecfb138a822739d revision: 505c3f2739eb1da918e54111aecfb138a822739d
@ -191,9 +199,6 @@ GEM
docile (1.1.5) docile (1.1.5)
domain_name (0.5.25) domain_name (0.5.25)
unf (>= 0.0.5, < 1.0.0) unf (>= 0.0.5, < 1.0.0)
epp-xml (1.0.4)
activesupport (~> 4.1)
builder (~> 3.2)
equalizer (0.0.11) equalizer (0.0.11)
erubis (2.7.0) erubis (2.7.0)
execjs (2.6.0) execjs (2.6.0)
@ -311,7 +316,7 @@ GEM
mina (0.3.1) mina (0.3.1)
open4 (~> 1.3.4) open4 (~> 1.3.4)
rake rake
mini_portile2 (2.0.0) mini_portile2 (2.1.0)
minitest (5.8.4) minitest (5.8.4)
monetize (1.1.0) monetize (1.1.0)
money (~> 6.5.0) money (~> 6.5.0)
@ -327,8 +332,9 @@ GEM
nenv (0.2.0) nenv (0.2.0)
netrc (0.11.0) netrc (0.11.0)
newrelic_rpm (3.12.0.288) newrelic_rpm (3.12.0.288)
nokogiri (1.6.7.2) nokogiri (1.6.8)
mini_portile2 (~> 2.0.0.rc2) mini_portile2 (~> 2.1.0)
pkg-config (~> 1.1.7)
nori (2.6.0) nori (2.6.0)
notiffany (0.0.7) notiffany (0.0.7)
nenv (~> 0.1) nenv (~> 0.1)
@ -343,6 +349,7 @@ GEM
phantomjs (1.9.8.0) phantomjs (1.9.8.0)
phantomjs-binaries (1.9.2.4) phantomjs-binaries (1.9.2.4)
sys-uname (= 0.9.0) sys-uname (= 0.9.0)
pkg-config (1.1.7)
poltergeist (1.6.0) poltergeist (1.6.0)
capybara (~> 2.1) capybara (~> 2.1)
cliver (~> 0.3.1) cliver (~> 0.3.1)
@ -589,7 +596,7 @@ DEPENDENCIES
devise (= 3.5.4) devise (= 3.5.4)
digidoc_client (= 0.2.1) digidoc_client (= 0.2.1)
epp (= 1.4.2)! epp (= 1.4.2)!
epp-xml (= 1.0.4) epp-xml (= 1.0.5)!
fabrication (= 2.13.2) fabrication (= 2.13.2)
faker (= 1.4.3) faker (= 1.4.3)
figaro (= 1.1.1) figaro (= 1.1.1)
@ -614,7 +621,7 @@ DEPENDENCIES
mina (= 0.3.1) mina (= 0.3.1)
money-rails (= 1.4.1) money-rails (= 1.4.1)
newrelic_rpm (= 3.12.0.288) newrelic_rpm (= 3.12.0.288)
nokogiri (= 1.6.7.2) nokogiri (= 1.6.8)
nprogress-rails (= 0.1.6.7) nprogress-rails (= 0.1.6.7)
paper_trail! paper_trail!
pdfkit (= 0.6.2) pdfkit (= 0.6.2)

View file

@ -49,7 +49,8 @@ module Repp
response_code: status, response_code: status,
api_user_name: current_user.try(:username), api_user_name: current_user.try(:username),
api_user_registrar: current_user.try(:registrar).try(:to_s), api_user_registrar: current_user.try(:registrar).try(:to_s),
ip: request.ip ip: request.ip,
uuid: request.try(:uuid)
}) })
end end

View file

@ -35,7 +35,7 @@ module Repp
error! I18n.t('errors.messages.epp_authorization_error'), 401 unless domain.auth_info.eql? request.headers['Auth-Code'] error! I18n.t('errors.messages.epp_authorization_error'), 401 unless domain.auth_info.eql? request.headers['Auth-Code']
contact_repp_json = proc{|contact| contact_repp_json = proc{|contact|
contact.attributes.slice("code", "name", "ident", "ident_type", "ident_country_code", "phone", "email", "street", "city", "zip","country_code", "statuses") contact.as_json.slice("code", "name", "ident", "ident_type", "ident_country_code", "phone", "email", "street", "city", "zip","country_code", "statuses")
} }
@response = { @response = {

View file

@ -9,5 +9,6 @@
#= require shared/jquery.validate.bootstrap #= require shared/jquery.validate.bootstrap
#= require jquery-ui/datepicker #= require jquery-ui/datepicker
#= require select2 #= require select2
#= require jquery.doubleScroll
#= require shared/general #= require shared/general
#= require admin/application #= require admin/application

View file

@ -2,6 +2,9 @@ $(document).on 'page:change', ->
$('.selectize').selectize({ $('.selectize').selectize({
allowEmptyOption: true allowEmptyOption: true
}) })
$('.selectize_create').selectize({
allowEmptyOption: true, create: true
})
$('.js-datepicker').datepicker({ $('.js-datepicker').datepicker({
showAnim: "", showAnim: "",
@ -16,3 +19,35 @@ $(document).on 'page:change', ->
$(this).validate() $(this).validate()
$('[data-toggle="popover"]').popover() $('[data-toggle="popover"]').popover()
# doublescroll
$('[data-doublescroll]').doubleScroll({
onlyIfScroll: false,
scrollCss:
'overflow-x': 'auto'
'overflow-y': 'hidden'
contentCss:
'overflow-x': 'auto'
'overflow-y': 'hidden'
resetOnWindowResize: true
})
positionSlider = ->
for scroll in document.querySelectorAll('[data-doublescroll]')
wrapper = scroll.previousSibling
if $(scroll).offset().top < $(window).scrollTop()
wrapper.style.position = 'fixed'
wrapper.style.top = '-5px'
else
wrapper.style.position = 'relative'
wrapper.style.top = '0'
return
positionSlider()
$(window).scroll(positionSlider).resize positionSlider
#due .report-table width: auto top scrollbar appears after resize so we do fake resize action
$(window).resize()

View file

@ -29,13 +29,13 @@ $(document).on 'page:change', ->
$('.js-contact-form').trigger('restoreDefault') $('.js-contact-form').trigger('restoreDefault')
$('[data-legal-document]').each (i, fileInput)-> $('[data-legal-document]').each (i, fileInput)->
minSize = 8 * 1024 # 8kB minSize = 3 * 1024 # 3kB
maxSize = 8 * 1024 * 1024; # 8 MB maxSize = 8 * 1024 * 1024; # 8 MB
$(fileInput).closest('form').submit (e) -> $(fileInput).closest('form').submit (e) ->
if (files = fileInput.files).length if (files = fileInput.files).length
fileSize = files[0].size fileSize = files[0].size
if fileSize < minSize if fileSize < minSize
alert 'Document size should be more than 8kB' alert 'Document size should be more than 3kB'
return false return false
else if fileSize > maxSize else if fileSize > maxSize
alert 'Document size should be less than 8MB' alert 'Document size should be less than 8MB'

View file

@ -0,0 +1,56 @@
class Admin::ContactVersionsController < AdminController
load_and_authorize_resource
def index
params[:q] ||= {}
@q = ContactVersion.search(params[:q])
@versions = @q.result.page(params[:page])
search_params = params[:q].deep_dup
whereS = "1=1"
search_params.each do |key, value|
next if value.empty?
case key
when 'event'
whereS += " AND event = '#{value}'"
else
whereS += create_where_string(key, value)
end
end
versions = ContactVersion.includes(:item).where(whereS).order(created_at: :desc, id: :desc)
@q = versions.search(params[:q])
@versions = @q.result.page(params[:page])
@versions = @versions.per(params[:results_per_page]) if params[:results_per_page].to_i > 0
end
def show
per_page = 7
@version = ContactVersion.find(params[:id])
@versions = ContactVersion.where(item_id: @version.item_id).order(created_at: :desc, id: :desc)
@versions_map = @versions.all.map(&:id)
# what we do is calc amount of results until needed version
# then we cacl which page it is
if params[:page].blank?
counter = @versions_map.index(@version.id) + 1
page = counter / per_page
page += 1 if (counter % per_page) != 0
params[:page] = page
end
@versions = @versions.page(params[:page]).per(per_page)
end
def search
render json: ContactVersion.search_by_query(params[:q])
end
def create_where_string(key, value)
" AND object->>'#{key}' ~* '#{value}'"
end
end

View file

@ -10,22 +10,14 @@ class Admin::ContactsController < AdminController
search_params[:registrant_domains_id_not_null] = 1 search_params[:registrant_domains_id_not_null] = 1
end end
@q = Contact.includes(:registrar).search(search_params) contacts = Contact.includes(:registrar).joins(:registrar).select('contacts.*, registrars.name')
@contacts = @q.result(distinct: :true).page(params[:page]) contacts = contacts.filter_by_states(params[:statuses_contains].join(',')) if params[:statuses_contains]
if params[:statuses_contains]
contacts = Contact.includes(:registrar).where(
"contacts.statuses @> ?::varchar[]", "{#{params[:statuses_contains].join(',')}}"
)
else
contacts = Contact.includes(:registrar)
end
contacts = contacts.where("ident_country_code is null or ident_country_code=''") if params[:only_no_country_code].eql?('1') contacts = contacts.where("ident_country_code is null or ident_country_code=''") if params[:only_no_country_code].eql?('1')
normalize_search_parameters do normalize_search_parameters do
@q = contacts.search(search_params) @q = contacts.search(search_params)
@contacts = @q.result(distinct: :true).page(params[:page]) @contacts = @q.result.uniq.page(params[:page])
end end
@contacts = @contacts.per(params[:results_per_page]) if params[:results_per_page].to_i > 0 @contacts = @contacts.per(params[:results_per_page]) if params[:results_per_page].to_i > 0

View file

@ -1,18 +1,75 @@
class Admin::DomainVersionsController < AdminController class Admin::DomainVersionsController < AdminController
load_and_authorize_resource load_and_authorize_resource
# rubocop:disable Style/GuardClause
def index def index
@domain = Domain.where(id: params[:domain_id]).includes({versions: :item}).first params[:q] ||= {}
@versions = @domain.versions
@q = DomainVersion.includes(:item).search(params[:q])
@versions = @q.result.page(params[:page])
search_params = params[:q].deep_dup
if search_params[:registrant].present?
registrants = Contact.where("name ilike ?", "%#{search_params[:registrant].strip}%")
search_params.delete(:registrant)
end
if search_params[:registrar].present?
registrars = Registrar.where("name ilike ?", "%#{search_params[:registrar].strip}%")
search_params.delete(:registrar)
end
whereS = "1=1"
search_params.each do |key, value|
next if value.empty?
case key
when 'event'
whereS += " AND event = '#{value}'"
when 'name'
whereS += " AND (object->>'name' ~* '#{value}' OR object_changes->>'name' ~* '#{value}')"
else
whereS += create_where_string(key, value)
end
end
whereS += " AND object->>'registrant_id' IN (#{registrants.map { |r| "'#{r.id.to_s}'" }.join ','})" if registrants.present?
whereS += " AND 1=0" if registrants == []
whereS += " AND object->>'registrar_id' IN (#{registrars.map { |r| "'#{r.id.to_s}'" }.join ','})" if registrars.present?
whereS += " AND 1=0" if registrars == []
versions = DomainVersion.includes(:item).where(whereS).order(created_at: :desc, id: :desc)
@q = versions.search(params[:q])
@versions = @q.result.page(params[:page])
@versions = @versions.per(params[:results_per_page]) if params[:results_per_page].to_i > 0
render "admin/domain_versions/archive"
# Depricated it had to load legal document. We may do it by parsing and adding link.
# if @domain.pending_json.present?
# frame = Nokogiri::XML(@domain.pending_json['frame'])
# @pending_user = User.find(@domain.pending_json['current_user_id'])
# @pending_domain = Epp::Domain.find(@domain.id)
# @pending_domain.update(frame, @pending_user, false)
# end
end end
# rubocop:enable Style/GuardClause
def show
per_page = 7
@version = DomainVersion.find(params[:id])
@versions = DomainVersion.where(item_id: @version.item_id).order(created_at: :desc, id: :desc)
@versions_map = @versions.all.map(&:id)
# what we do is calc amount of results until needed version
# then we cacl which page it is
if params[:page].blank?
counter = @versions_map.index(@version.id) + 1
page = counter / per_page
page += 1 if (counter % per_page) != 0
params[:page] = page
end
@versions = @versions.page(params[:page]).per(per_page)
end
def search
render json: DomainVersion.search_by_query(params[:q])
end
def create_where_string(key, value)
" AND object->>'#{key}' ~* '#{value}'"
end
end end

View file

@ -9,7 +9,7 @@ class Admin::DomainsController < AdminController
params[:q] ||= {} params[:q] ||= {}
if params[:statuses_contains] if params[:statuses_contains]
domains = Domain.includes(:registrar, :registrant).where( domains = Domain.includes(:registrar, :registrant).where(
"statuses @> ?::varchar[]", "{#{params[:statuses_contains].join(',')}}" "domains.statuses @> ?::varchar[]", "{#{params[:statuses_contains].join(',')}}"
) )
else else
domains = Domain.includes(:registrar, :registrant) domains = Domain.includes(:registrar, :registrant)
@ -77,6 +77,11 @@ class Admin::DomainsController < AdminController
redirect_to [:admin, @domain] redirect_to [:admin, @domain]
end end
def versions
@domain = Domain.where(id: params[:domain_id]).includes({versions: :item}).first
@versions = @domain.versions
end
private private
def set_domain def set_domain

View file

@ -5,7 +5,11 @@ class Admin::EppLogsController < AdminController
def index def index
@q = ApiLog::EppLog.search(params[:q]) @q = ApiLog::EppLog.search(params[:q])
@q.sorts = 'id desc' if @q.sorts.empty? @q.sorts = 'id desc' if @q.sorts.empty?
@epp_logs = @q.result.page(params[:page])
@epp_logs = @q.result
@epp_logs = @epp_logs.where("extract(epoch from created_at) >= extract(epoch from ?::timestamp)", Time.parse(params[:q][:created_at_gteq])) if params[:q][:created_at_gteq].present?
@epp_logs = @epp_logs.where("extract(epoch from created_at) <= extract(epoch from ?::timestamp)", Time.parse(params[:q][:created_at_lteq])) if params[:q][:created_at_lteq].present?
@epp_logs = @epp_logs.page(params[:page])
end end
def show def show

View file

@ -5,7 +5,11 @@ class Admin::ReppLogsController < AdminController
def index def index
@q = ApiLog::ReppLog.search(params[:q]) @q = ApiLog::ReppLog.search(params[:q])
@q.sorts = 'id desc' if @q.sorts.empty? @q.sorts = 'id desc' if @q.sorts.empty?
@repp_logs = @q.result.page(params[:page])
@repp_logs = @q.result
@repp_logs = @repp_logs.where("extract(epoch from created_at) >= extract(epoch from ?::timestamp)", Time.parse(params[:q][:created_at_gteq])) if params[:q][:created_at_gteq].present?
@repp_logs = @repp_logs.where("extract(epoch from created_at) <= extract(epoch from ?::timestamp)", Time.parse(params[:q][:created_at_lteq])) if params[:q][:created_at_lteq].present?
@repp_logs = @repp_logs.page(params[:page])
end end
def show def show

View file

@ -51,6 +51,7 @@ class Admin::SettingsController < AdminController
:admin_contacts_max_count, :admin_contacts_max_count,
:tech_contacts_min_count, :tech_contacts_min_count,
:tech_contacts_max_count, :tech_contacts_max_count,
:orphans_contacts_in_months,
:ds_digest_type, :ds_digest_type,
:dnskeys_min_count, :dnskeys_min_count,
:dnskeys_max_count, :dnskeys_max_count,

View file

@ -55,6 +55,10 @@ class ApplicationController < ActionController::Base
end end
end end
def info_for_paper_trail
{ uuid: request.uuid }
end
def user_for_paper_trail def user_for_paper_trail
user_log_str(current_user) user_log_str(current_user)
end end

View file

@ -19,6 +19,8 @@ class Epp::ContactsController < EppController
authorize! :create, Epp::Contact authorize! :create, Epp::Contact
@contact = Epp::Contact.new(params[:parsed_frame], current_user.registrar) @contact = Epp::Contact.new(params[:parsed_frame], current_user.registrar)
@contact.add_legal_file_to_new(params[:parsed_frame])
if @contact.save if @contact.save
render_epp_response '/epp/contacts/create' render_epp_response '/epp/contacts/create'
else else
@ -29,7 +31,7 @@ class Epp::ContactsController < EppController
def update def update
authorize! :update, @contact, @password authorize! :update, @contact, @password
if @contact.update_attributes(params[:parsed_frame]) if @contact.update_attributes(params[:parsed_frame], current_user)
render_epp_response 'epp/contacts/update' render_epp_response 'epp/contacts/update'
else else
handle_errors(@contact) handle_errors(@contact)
@ -39,7 +41,7 @@ class Epp::ContactsController < EppController
def delete def delete
authorize! :delete, @contact, @password authorize! :delete, @contact, @password
if @contact.destroy_and_clean if @contact.destroy_and_clean(params[:parsed_frame])
render_epp_response '/epp/contacts/delete' render_epp_response '/epp/contacts/delete'
else else
handle_errors(@contact) handle_errors(@contact)

View file

@ -30,6 +30,8 @@ class Epp::DomainsController < EppController
handle_errors and return unless balance_ok?('create') # loads pricelist in this method handle_errors and return unless balance_ok?('create') # loads pricelist in this method
ActiveRecord::Base.transaction do ActiveRecord::Base.transaction do
@domain.add_legal_file_to_new(params[:parsed_frame])
if @domain.save # TODO: Maybe use validate: false here because we have already validated the domain? if @domain.save # TODO: Maybe use validate: false here because we have already validated the domain?
current_user.registrar.debit!({ current_user.registrar.debit!({
sum: @domain_pricelist.price.amount, sum: @domain_pricelist.price.amount,

View file

@ -56,4 +56,8 @@ class Epp::KeyrelaysController < EppController
# domain # domain
end end
def resource
@domain
end
end end

View file

@ -54,4 +54,8 @@ class Epp::PollsController < EppController
def validate_poll def validate_poll
requires_attribute 'poll', 'op', values: %(ack req), allow_blank: true requires_attribute 'poll', 'op', values: %(ack req), allow_blank: true
end end
def resource
@message
end
end end

View file

@ -137,4 +137,9 @@ class Epp::SessionsController < EppController
pw = params[:parsed_frame].css('pw').first.text pw = params[:parsed_frame].css('pw').first.text
{ username: user, password: pw } { username: user, password: pw }
end end
private
def resource
@api_user
end
end end

View file

@ -6,8 +6,15 @@ class EppController < ApplicationController
before_action :generate_svtrid before_action :generate_svtrid
before_action :latin_only before_action :latin_only
before_action :validate_against_schema before_action :validate_against_schema
before_action :validate_request
before_action :update_epp_session
around_action :catch_epp_errors
helper_method :current_user
helper_method :resource
def validate_against_schema def validate_against_schema
return if ['hello', 'error', 'keyrelay'].include?(params[:action]) return if ['hello', 'error', 'keyrelay'].include?(params[:action])
schema.validate(params[:nokogiri_frame]).each do |error| schema.validate(params[:nokogiri_frame]).each do |error|
@ -20,10 +27,7 @@ class EppController < ApplicationController
handle_errors and return if epp_errors.any? handle_errors and return if epp_errors.any?
end end
before_action :validate_request
before_action :update_epp_session
around_action :catch_epp_errors
def catch_epp_errors def catch_epp_errors
err = catch(:epp_error) do err = catch(:epp_error) do
yield yield
@ -34,7 +38,6 @@ class EppController < ApplicationController
handle_errors handle_errors
end end
helper_method :current_user
rescue_from StandardError do |e| rescue_from StandardError do |e|
@errors ||= [] @errors ||= []
@ -361,17 +364,18 @@ class EppController < ApplicationController
if request_command == 'login' && frame.present? if request_command == 'login' && frame.present?
frame.gsub!(/pw>.+<\//, 'pw>[FILTERED]</') frame.gsub!(/pw>.+<\//, 'pw>[FILTERED]</')
end end
trimmed_request = frame.gsub(/<eis:legalDocument([^>]+)>([^<])+<\/eis:legalDocument>/, "<eis:legalDocument>[FILTERED]</eis:legalDocument>") trimmed_request = frame.gsub(/<eis:legalDocument([^>]+)>([^<])+<\/eis:legalDocument>/, "<eis:legalDocument>[FILTERED]</eis:legalDocument>") if frame.present?
ApiLog::EppLog.create({ ApiLog::EppLog.create({
request: trimmed_request, request: trimmed_request,
request_command: request_command, request_command: request_command,
request_successful: epp_errors.empty?, request_successful: epp_errors.empty?,
request_object: params[:epp_object_type], request_object: resource ? "#{params[:epp_object_type]}: #{resource.class} - #{resource.id} - #{resource.name}" : params[:epp_object_type],
response: @response, response: @response,
api_user_name: @api_user.try(:username) || current_user.try(:username) || 'api-public', api_user_name: @api_user.try(:username) || current_user.try(:username) || 'api-public',
api_user_registrar: @api_user.try(:registrar).try(:to_s) || current_user.try(:registrar).try(:to_s), api_user_registrar: @api_user.try(:registrar).try(:to_s) || current_user.try(:registrar).try(:to_s),
ip: request.ip ip: request.ip,
uuid: request.uuid
}) })
end end
# rubocop: enable Metrics/CyclomaticComplexity # rubocop: enable Metrics/CyclomaticComplexity
@ -382,4 +386,9 @@ class EppController < ApplicationController
return if current_user.blank? return if current_user.blank?
counter_update(current_user.registrar_code, ENV['iptables_server_ip']) counter_update(current_user.registrar_code, ENV['iptables_server_ip'])
end end
def resource
name = self.class.to_s.sub("Epp::","").sub("Controller","").underscore.singularize
instance_variable_get("@#{name}")
end
end end

View file

@ -28,7 +28,7 @@ class Registrant::DomainDeleteConfirmsController < RegistrantController
flash[:notice] = t(:registrant_domain_verification_rejected) flash[:notice] = t(:registrant_domain_verification_rejected)
redirect_to registrant_domain_delete_confirm_path(@domain.id, rejected: true) redirect_to registrant_domain_delete_confirm_path(@domain.id, rejected: true)
else else
flash[:alert] = t(:registrant_domain_verification_rejected_failed) flash[:alert] = t(:registrant_domain_delete_rejected_failed)
return render 'show' return render 'show'
end end
elsif params[:confirmed] elsif params[:confirmed]
@ -36,7 +36,7 @@ class Registrant::DomainDeleteConfirmsController < RegistrantController
flash[:notice] = t(:registrant_domain_verification_confirmed) flash[:notice] = t(:registrant_domain_verification_confirmed)
redirect_to registrant_domain_delete_confirm_path(@domain.id, confirmed: true) redirect_to registrant_domain_delete_confirm_path(@domain.id, confirmed: true)
else else
flash[:alert] = t(:registrant_domain_verification_confirmed_failed) flash[:alert] = t(:registrant_domain_delete_confirmed_failed)
return render 'show' return render 'show'
end end
end end

View file

@ -42,13 +42,8 @@ class Registrar::ContactsController < Registrar::DeppController # EPP controller
@contacts = Contact.find_by(name: params[:q][:name_matches]) @contacts = Contact.find_by(name: params[:q][:name_matches])
end end
if params[:statuses_contains] contacts = current_user.registrar.contacts.includes(:registrar)
contacts = current_user.registrar.contacts.includes(:registrar).where( contacts = contacts.filter_by_states(params[:statuses_contains]) if params[:statuses_contains]
"contacts.statuses @> ?::varchar[]", "{#{params[:statuses_contains].join(',')}}"
)
else
contacts = current_user.registrar.contacts.includes(:registrar)
end
normalize_search_parameters do normalize_search_parameters do
@q = contacts.search(params[:q]) @q = contacts.search(params[:q])

View file

@ -22,12 +22,12 @@ module ApplicationHelper
case ident_type case ident_type
when 'birthday' when 'birthday'
"#{ident} [#{ident_type}]" "#{ident} [#{ident_country_code} #{ident_type}]"
else else
if ident.present? if ident.present?
"#{ident} [#{ident_country_code} #{ident_type}]" "#{ident} [#{ident_country_code} #{ident_type}]"
else else
"[No access]" "[#{ident_country_code} #{ident_type}]"
end end
end end
@ -72,4 +72,15 @@ module ApplicationHelper
link_to(title, url_for(sort: {param_name => order}), class: "sort_link #{order}") link_to(title, url_for(sort: {param_name => order}), class: "sort_link #{order}")
end end
def changing_css_class(version, *attrs)
return unless version
css_class = "text-warning"
if attrs.size == 1
version.object_changes.to_h[attrs.first] && css_class
else
version.object_changes.to_h.slice(*attrs).any? && css_class
end
end
end end

View file

@ -4,17 +4,30 @@ class DomainDeleteConfirmJob < Que::Job
# it's recommended to keep transaction against job table as short as possible. # it's recommended to keep transaction against job table as short as possible.
ActiveRecord::Base.transaction do ActiveRecord::Base.transaction do
domain = Epp::Domain.find(domain_id) domain = Epp::Domain.find(domain_id)
case action case action
when RegistrantVerification::CONFIRMED when RegistrantVerification::CONFIRMED
domain.poll_message!(:poll_pending_delete_confirmed_by_registrant) domain.poll_message!(:poll_pending_delete_confirmed_by_registrant)
domain.apply_pending_delete! domain.apply_pending_delete!
raise_errors!(domain)
when RegistrantVerification::REJECTED when RegistrantVerification::REJECTED
DomainMailer.pending_delete_rejected_notification(domain_id, true).deliver
domain.statuses.delete(DomainStatus::PENDING_DELETE_CONFIRMATION) domain.statuses.delete(DomainStatus::PENDING_DELETE_CONFIRMATION)
domain.poll_message!(:poll_pending_delete_rejected_by_registrant) domain.poll_message!(:poll_pending_delete_rejected_by_registrant)
domain.cancel_pending_delete domain.cancel_pending_delete
domain.save(validate: false)
raise_errors!(domain)
DomainMailer.pending_delete_rejected_notification(domain_id, true).deliver
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
end end
def raise_errors!(domain)
throw "domain #{domain.name} failed with errors #{domain.errors.full_messages}" if domain.errors.any?
end
end end

View file

@ -0,0 +1,17 @@
class DomainDeleteJob < Que::Job
def run(domain_id)
domain = Domain.find(domain_id)
::PaperTrail.whodunnit = "job - #{self.class.name}"
WhoisRecord.where(domain_id: domain.id).destroy_all
domain.destroy
bye_bye = domain.versions.last
domain.registrar.messages.create!(
body: "#{I18n.t(:domain_deleted)}: #{domain.name}",
attached_obj_id: bye_bye.id,
attached_obj_type: bye_bye.class.to_s
)
end
end

View file

@ -0,0 +1,10 @@
class DomainSetDeleteCandidateJob < Que::Job
def run(domain_id)
domain = Domain.find(domain_id)
domain.statuses << DomainStatus::DELETE_CANDIDATE
::PaperTrail.whodunnit = "job - #{self.class.name}"
domain.save(validate: false)
DomainDeleteJob.enqueue(domain.id, run_at: rand(((24*60) - (DateTime.now.hour * 60 + DateTime.now.minute))).minutes.from_now)
end
end

View file

@ -8,8 +8,13 @@ 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)
raise_errors!(domain)
domain.apply_pending_update! domain.apply_pending_update!
raise_errors!(domain)
domain.clean_pendings! domain.clean_pendings!
raise_errors!(domain)
when RegistrantVerification::REJECTED when RegistrantVerification::REJECTED
domain.send_mail :pending_update_rejected_notification_for_new_registrant domain.send_mail :pending_update_rejected_notification_for_new_registrant
domain.poll_message!(:poll_pending_update_rejected_by_registrant) domain.poll_message!(:poll_pending_update_rejected_by_registrant)
@ -18,4 +23,8 @@ class DomainUpdateConfirmJob < Que::Job
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
end end
def raise_errors!(domain)
throw "domain #{domain.name} failed with errors #{domain.errors.full_messages}" if domain.errors.any?
end
end end

View file

@ -4,6 +4,11 @@ class ContactMailer < ApplicationMailer
def email_updated(old_email, email, contact_id, should_deliver) def email_updated(old_email, email, contact_id, should_deliver)
@contact = Contact.find_by(id: contact_id) @contact = Contact.find_by(id: contact_id)
@old_email = old_email @old_email = old_email
unless @contact
Rails.logger.info "Cannot send email in #{self.class.name}##{__method__} with contact_id #{contact_id}. It cannot be found"
return
end
return unless email || @contact return unless email || @contact
return if delivery_off?(@contact, should_deliver) return if delivery_off?(@contact, should_deliver)

View file

@ -9,12 +9,34 @@ class DomainMailer < ApplicationMailer
compose_from(params) compose_from(params)
end end
def registrant_updated_notification_for_new_registrant(params)
compose_from(params) def registrant_updated_notification_for_new_registrant(domain_id, old_registrant_id, new_registrant_id, should_deliver)
@domain = Domain.find_by(id: domain_id)
return unless @domain
return if delivery_off?(@domain, should_deliver)
@old_registrant = Registrant.find(old_registrant_id)
@new_registrant = Registrant.find(new_registrant_id)
return if whitelist_blocked?(@new_registrant.email)
mail(to: format(@new_registrant.email),
subject: "#{I18n.t(:registrant_updated_notification_for_new_registrant_subject,
name: @domain.name)} [#{@domain.name}]")
end end
def registrant_updated_notification_for_old_registrant(params)
compose_from(params) def registrant_updated_notification_for_old_registrant(domain_id, old_registrant_id, new_registrant_id, should_deliver)
@domain = Domain.find_by(id: domain_id)
return unless @domain
return if delivery_off?(@domain, should_deliver)
@old_registrant = Registrant.find(old_registrant_id)
@new_registrant = Registrant.find(new_registrant_id)
return if whitelist_blocked?(@old_registrant.email)
mail(to: format(@old_registrant.email),
subject: "#{I18n.t(:registrant_updated_notification_for_old_registrant_subject,
name: @domain.name)} [#{@domain.name}]")
end end
def pending_update_rejected_notification_for_new_registrant(params) def pending_update_rejected_notification_for_new_registrant(params)

View file

@ -95,6 +95,7 @@ class Ability
can :manage, ReservedDomain can :manage, ReservedDomain
can :manage, ZonefileSetting can :manage, ZonefileSetting
can :manage, DomainVersion can :manage, DomainVersion
can :manage, ContactVersion
can :manage, Pricelist can :manage, Pricelist
can :manage, User can :manage, User
can :manage, ApiUser can :manage, ApiUser

View file

@ -6,7 +6,6 @@ class AccountActivity < ActiveRecord::Base
belongs_to :bank_transaction belongs_to :bank_transaction
belongs_to :invoice belongs_to :invoice
attr_accessor :registrar
CREATE = 'create' CREATE = 'create'
RENEW = 'renew' RENEW = 'renew'
@ -24,14 +23,15 @@ class AccountActivity < ActiveRecord::Base
end end
def to_csv def to_csv
attributes = %w(registrar description activity_type created_at sum) attributes = %w(description activity_type created_at sum)
CSV.generate(headers: true) do |csv| CSV.generate(headers: true) do |csv|
csv << %w(registrar description activity_type receipt_date sum) csv << %w(registrar description activity_type receipt_date sum)
all.each do |x| # rubocop:disable Rails/FindEach all.each do |x| # rubocop:disable Rails/FindEach
x.registrar = Registrar.find(x.account_id).try(:code) attrs = [x.account.registrar.try(:code)]
csv << attributes.map { |attr| x.send(attr) } attrs += attributes.map { |attr| x.send(attr) }
csv << attrs
end end
end end
end end

View file

@ -62,6 +62,10 @@ class ApiUser < User
username username
end end
def name
username
end
def queued_messages def queued_messages
registrar.messages.queued registrar.messages.queued
end end

View file

@ -40,7 +40,7 @@ class BlockedDomain < ActiveRecord::Base
def generate_json def generate_json
h = HashWithIndifferentAccess.new h = HashWithIndifferentAccess.new
h[:name] = self.name h[:name] = self.name
h[:status] = 'Blocked' h[:status] = ['Blocked']
h h
end end

View file

@ -3,6 +3,7 @@ module Versions
extend ActiveSupport::Concern extend ActiveSupport::Concern
included do included do
attr_accessor :version_loader
has_paper_trail class_name: "#{model_name}Version" has_paper_trail class_name: "#{model_name}Version"
# add creator and updator # add creator and updator
@ -55,4 +56,23 @@ module Versions
domains.each(&:touch_with_version) domains.each(&:touch_with_version)
end end
end end
module ClassMethods
def all_versions_for(ids, time)
ver_klass = paper_trail_version_class
from_history = ver_klass.where(item_id: ids.to_a).
order(:item_id).
preceding(time + 1, true).
select("distinct on (item_id) #{ver_klass.table_name}.*").
map do |ver|
o = new(ver.object)
o.version_loader = ver
ver.object_changes.to_h.each { |k, v| o[k]=v[-1] }
o
end
not_in_history = where(id: (ids.to_a - from_history.map(&:id)))
from_history + not_in_history
end
end
end end

View file

@ -12,6 +12,10 @@ class Contact < ActiveRecord::Base
# TODO: remove later # TODO: remove later
has_many :depricated_statuses, class_name: 'DepricatedContactStatus', dependent: :destroy has_many :depricated_statuses, class_name: 'DepricatedContactStatus', dependent: :destroy
has_paper_trail class_name: "ContactVersion", meta: { children: :children_log }
attr_accessor :legal_document_id
accepts_nested_attributes_for :legal_documents accepts_nested_attributes_for :legal_documents
validates :name, :phone, :email, :ident, :ident_type, validates :name, :phone, :email, :ident, :ident_type,
@ -29,18 +33,20 @@ class Contact < ActiveRecord::Base
uniqueness: { message: :epp_id_taken }, uniqueness: { message: :epp_id_taken },
format: { with: /\A[\w\-\:\.\_]*\z/i, message: :invalid }, format: { with: /\A[\w\-\:\.\_]*\z/i, message: :invalid },
length: { maximum: 100, message: :too_long_contact_code } length: { maximum: 100, message: :too_long_contact_code }
validate :val_ident_type
validate :val_ident_valid_format? validate :val_ident_valid_format?
validate :uniq_statuses?
validate :validate_html validate :validate_html
validate :val_country_code
after_initialize do after_initialize do
self.statuses = [] if statuses.nil?
self.status_notes = {} if status_notes.nil? self.status_notes = {} if status_notes.nil?
self.ident_updated_at = Time.zone.now if new_record? && ident_updated_at.blank? self.ident_updated_at = Time.zone.now if new_record? && ident_updated_at.blank?
end end
before_validation :set_ident_country_code before_validation :to_upcase_country_code
before_validation :prefix_code before_validation :prefix_code
before_validation :strip_email
before_create :generate_auth_info before_create :generate_auth_info
before_update :manage_emails before_update :manage_emails
@ -56,16 +62,6 @@ class Contact < ActiveRecord::Base
end end
end end
before_save :manage_statuses
def manage_statuses
if domain_transfer # very ugly but need better workflow
self.statuses = statuses | [OK, LINKED]
return
end
manage_linked
manage_ok
end
after_save :update_related_whois_records after_save :update_related_whois_records
@ -76,7 +72,7 @@ class Contact < ActiveRecord::Base
ORG = 'org' ORG = 'org'
PRIV = 'priv' PRIV = 'priv'
BIRTHDAY = 'birthday' BIRTHDAY = 'birthday'.freeze
PASSPORT = 'passport' PASSPORT = 'passport'
IDENT_TYPES = [ IDENT_TYPES = [
@ -168,7 +164,7 @@ class Contact < ActiveRecord::Base
end end
def find_orphans def find_orphans
Contact.where(' where('
NOT EXISTS( NOT EXISTS(
select 1 from domains d where d.registrant_id = contacts.id select 1 from domains d where d.registrant_id = contacts.id
) AND NOT EXISTS( ) AND NOT EXISTS(
@ -177,20 +173,49 @@ class Contact < ActiveRecord::Base
') ')
end end
def find_linked
where('
EXISTS(
select 1 from domains d where d.registrant_id = contacts.id
) OR EXISTS(
select 1 from domain_contacts dc where dc.contact_id = contacts.id
)
')
end
def filter_by_states in_states
states = Array(in_states).dup
scope = all
# all contacts has state ok, so no need to filter by it
scope = scope.where("NOT contacts.statuses && ?::varchar[]", "{#{(STATUSES - [OK, LINKED]).join(',')}}") if states.delete(OK)
scope = scope.find_linked if states.delete(LINKED)
scope = scope.where("contacts.statuses @> ?::varchar[]", "{#{states.join(',')}}") if states.any?
scope
end
# To leave only new ones we need to check
# if contact was at any time used in domain.
# This can be checked by domain history.
# This can be checked by saved relations in children attribute
def destroy_orphans def destroy_orphans
STDOUT << "#{Time.zone.now.utc} - Destroying orphaned contacts\n" unless Rails.env.test? STDOUT << "#{Time.zone.now.utc} - Destroying orphaned contacts\n" unless Rails.env.test?
orphans = find_orphans counter = Counter.new
find_orphans.find_each do |contact|
unless Rails.env.test? ver_scope = []
orphans.each do |m| %w(admin_contacts tech_contacts registrant).each do |type|
STDOUT << "#{Time.zone.now.utc} Contact.destroy_orphans: ##{m.id} (#{m.name})\n" ver_scope << "(children->'#{type}')::jsonb <@ json_build_array(#{contact.id})::jsonb"
end end
next if DomainVersion.where("created_at > ?", Time.now - Setting.orphans_contacts_in_months.to_i.months).where(ver_scope.join(" OR ")).any?
next if contact.domains_present?
contact.destroy
counter.next
STDOUT << "#{Time.zone.now.utc} Contact.destroy_orphans: ##{contact.id} (#{contact.name})\n"
end end
count = orphans.destroy_all.count STDOUT << "#{Time.zone.now.utc} - Successfully destroyed #{counter} orphaned contacts\n" unless Rails.env.test?
STDOUT << "#{Time.zone.now.utc} - Successfully destroyed #{count} orphaned contacts\n" unless Rails.env.test?
end end
def privs def privs
@ -231,10 +256,31 @@ class Contact < ActiveRecord::Base
"EIS-#{id}" "EIS-#{id}"
end end
# kind of decorator in order to always return statuses
# if we use separate decorator, then we should add it
# to too many places
def statuses
calculated = Array(read_attribute(:statuses))
calculated.delete(Contact::OK)
calculated.delete(Contact::LINKED)
calculated << Contact::OK if calculated.empty?# && valid?
calculated << Contact::LINKED if domains_present?
calculated.uniq
end
def statuses= arr
write_attribute(:statuses, Array(arr).uniq)
end
def to_s def to_s
name || '[no name]' name || '[no name]'
end end
def val_ident_type
errors.add(:ident_type, :epp_ident_type_invalid, code: code) if !%w(org priv birthday).include?(ident_type)
end
def val_ident_valid_format? def val_ident_valid_format?
case ident_country_code case ident_country_code
when 'EE'.freeze when 'EE'.freeze
@ -247,6 +293,8 @@ class Contact < ActiveRecord::Base
if ident.size != 8 || !(ident =~/\A[0-9]{8}\z/) if ident.size != 8 || !(ident =~/\A[0-9]{8}\z/)
errors.add(:ident, err_msg) errors.add(:ident, err_msg)
end end
when BIRTHDAY
errors.add(:ident, err_msg) if id.blank? # only for create action right now. Later for all of them
end end
end end
end end
@ -264,11 +312,6 @@ class Contact < ActiveRecord::Base
end end
end end
def uniq_statuses?
return true unless statuses.detect { |s| statuses.count(s) > 1 }
errors.add(:statuses, :not_uniq)
false
end
def org? def org?
ident_type == ORG ident_type == ORG
@ -279,6 +322,10 @@ class Contact < ActiveRecord::Base
!org? !org?
end end
def birthday?
ident_type == BIRTHDAY
end
def generate_auth_info def generate_auth_info
return if @generate_auth_info_disabled return if @generate_auth_info_disabled
return if auth_info.present? return if auth_info.present?
@ -330,22 +377,36 @@ class Contact < ActiveRecord::Base
# TODO: refactor, it should not allow to destroy with normal destroy, # TODO: refactor, it should not allow to destroy with normal destroy,
# no need separate method # no need separate method
# should use only in transaction # should use only in transaction
def destroy_and_clean def destroy_and_clean frame
if domains_present? if domains_present?
errors.add(:domains, :exist) errors.add(:domains, :exist)
return false return false
end end
legal_document_data = Epp::Domain.parse_legal_document_from_frame(frame)
if legal_document_data
doc = LegalDocument.create(
documentable_type: Contact,
document_type: legal_document_data[:type],
body: legal_document_data[:body]
)
self.legal_documents = [doc]
self.legal_document_id = doc.id
self.save
end
destroy destroy
end end
def set_ident_country_code def to_upcase_country_code
return true unless ident_country_code_changed? && ident_country_code.present? self.ident_country_code = ident_country_code.upcase if ident_country_code
code = Country.new(ident_country_code) self.country_code = country_code.upcase if country_code
if code end
self.ident_country_code = code.alpha2
else def val_country_code
errors.add(:ident, :invalid_country_code) errors.add(:ident, :invalid_country_code) unless Country.new(ident_country_code)
end errors.add(:ident, :invalid_country_code) unless Country.new(country_code)
end end
def related_domain_descriptions def related_domain_descriptions
@ -380,18 +441,15 @@ class Contact < ActiveRecord::Base
domain_contacts.present? || registrant_domains.present? domain_contacts.present? || registrant_domains.present?
end end
def manage_linked
if domains_present?
set_linked
else
unset_linked
end
end
def search_name def search_name
"#{code} #{name}" "#{code} #{name}"
end end
def strip_email
self.email = email.to_s.strip
end
# what we can do load firstly by registrant # what we can do load firstly by registrant
# if total is smaller than needed, the load more # if total is smaller than needed, the load more
@ -461,43 +519,6 @@ class Contact < ActiveRecord::Base
end end
end end
def set_linked
statuses << LINKED if statuses.detect { |s| s == LINKED }.blank?
end
def unset_linked
statuses.delete_if { |s| s == LINKED }
end
# rubocop:disable Metrics/CyclomaticComplexity
def manage_ok
return unset_ok unless valid?
case statuses.size
when 0
set_ok
when 1
set_ok if statuses == [LINKED]
when 2
return if statuses.sort == [LINKED, OK]
unset_ok
else
unset_ok
end
end
# rubocop:enable Metrics/CyclomaticComplexity
def unset_ok
statuses.delete_if { |s| s == OK }
end
def set_ok
statuses << OK if statuses.detect { |s| s == OK }.blank?
end
def linked?
statuses.include?(LINKED)
end
def update_prohibited? def update_prohibited?
(statuses & [ (statuses & [
@ -525,9 +546,18 @@ class Contact < ActiveRecord::Base
]).present? ]).present?
end end
def update_related_whois_records def update_related_whois_records
names = related_domain_descriptions.keys # not doing anything if no real changes
UpdateWhoisRecordJob.enqueue(names, :domain) if names.present? return if changes.slice(*(self.class.column_names - ["updated_at", "created_at", "statuses", "status_notes"])).empty?
end
names = related_domain_descriptions.keys
UpdateWhoisRecordJob.enqueue(names, :domain) if names.present?
end
def children_log
log = HashWithIndifferentAccess.new
log[:legal_documents]= [legal_document_id]
log
end
end end

View file

@ -66,8 +66,9 @@ module Depp
def delete(domain_params) def delete(domain_params)
xml = epp_xml.delete({ xml = epp_xml.delete({
name: { value: domain_params[:name] } name: { value: domain_params[:name] }},
}, Depp::Domain.construct_custom_params_hash(domain_params)) Depp::Domain.construct_custom_params_hash(domain_params),
(domain_params[:verified].present? && 'yes'))
current_user.request(xml) current_user.request(xml)
end end
@ -214,7 +215,8 @@ module Depp
rem_arr << { _anonymus: rem_anon } if rem_anon.any? rem_arr << { _anonymus: rem_anon } if rem_anon.any?
if domain_params[:registrant] != old_domain_params[:registrant] if domain_params[:registrant] != old_domain_params[:registrant]
chg = [{ registrant: { value: domain_params[:registrant] } }] chg = [{ registrant: { value: domain_params[:registrant] } }] if !domain_params[:verified].present?
chg = [{ registrant: { value: domain_params[:registrant], attrs: { verified: 'yes' } } }] if domain_params[:verified]
end end
add_arr = nil if add_arr.none? add_arr = nil if add_arr.none?

View file

@ -60,14 +60,15 @@ class Directo < ActiveRecord::Base
end end
def self.send_monthly_invoices def self.send_monthly_invoices(debug: false)
@debug = debug
I18n.locale = :et I18n.locale = :et
month = Time.now - 1.month month = Time.now - 1.month
invoices_until = month.end_of_month invoices_until = month.end_of_month
date_format = "%Y-%m-%d" date_format = "%Y-%m-%d"
invoice_counter= Counter.new invoice_counter= Counter.new
min_directo = Setting.invoice_number_min.presence.try(:to_i) min_directo = Setting.directo_monthly_number_min.presence.try(:to_i)
max_directo = Setting.directo_monthly_number_max.presence.try(:to_i) max_directo = Setting.directo_monthly_number_max.presence.try(:to_i)
last_directo = [Setting.directo_monthly_number_last.presence.try(:to_i), min_directo].compact.max || 0 last_directo = [Setting.directo_monthly_number_last.presence.try(:to_i), min_directo].compact.max || 0
if max_directo && max_directo <= last_directo if max_directo && max_directo <= last_directo
@ -100,8 +101,8 @@ class Directo < ActiveRecord::Base
"ProductName" => ".#{pricelist.category} registreerimine: #{pricelist.years_amount} aasta", "ProductName" => ".#{pricelist.category} registreerimine: #{pricelist.years_amount} aasta",
"UnitPriceWoVAT" => pricelist.price_decimal/pricelist.years_amount "UnitPriceWoVAT" => pricelist.price_decimal/pricelist.years_amount
} }
hash["StartDate"] = (activity.created_at + year.year).strftime(date_format) if year > 1 hash["StartDate"] = (activity.created_at + (year-1).year).end_of_month.strftime(date_format) if year > 1
hash["EndDate"] = (activity.created_at + year.year + 1).strftime(date_format) if year > 1 hash["EndDate"] = (activity.created_at + (year-1).year + 1).end_of_month.strftime(date_format) if year > 1
if items.has_key?(hash) if items.has_key?(hash)
items[hash]["Quantity"] += 1 items[hash]["Quantity"] += 1
@ -112,8 +113,10 @@ class Directo < ActiveRecord::Base
end end
#adding prepaiments #adding prepaiments
registrar_activities.where(activity_type: [AccountActivity::ADD_CREDIT]).each do |activity| if items.any?
hash = {"ProductID" => Setting.directo_receipt_product_name, "Unit" => "tk", "ProductName" => "Domeenide ettemaks", "UnitPriceWoVAT"=>activity.sum} total = 0
items.each{ |key, val| total += val["Quantity"] * key["UnitPriceWoVAT"] }
hash = {"ProductID" => Setting.directo_receipt_product_name, "Unit" => "tk", "ProductName" => "Domeenide ettemaks", "UnitPriceWoVAT"=>total}
items[hash] = {"RN"=>counter.next, "RR" => counter.now, "Quantity"=> -1} items[hash] = {"RN"=>counter.next, "RR" => counter.now, "Quantity"=> -1}
end end
@ -141,10 +144,14 @@ class Directo < ActiveRecord::Base
data = builder.to_xml.gsub("\n",'') data = builder.to_xml.gsub("\n",'')
response = RestClient::Request.execute(url: ENV['directo_invoice_url'], method: :post, payload: {put: "1", what: "invoice", xmldata: data}, verify_ssl: false).to_s response = RestClient::Request.execute(url: ENV['directo_invoice_url'], method: :post, payload: {put: "1", what: "invoice", xmldata: data}, verify_ssl: false).to_s
Setting.directo_monthly_number_last = directo_next if @debug
Nokogiri::XML(response).css("Result").each do |res| STDOUT << "#{Time.zone.now.utc} - Directo xml had to be sent #{data}\n"
Directo.create!(response: res.as_json.to_h, invoice_number: directo_next) else
Rails.logger.info("[DIRECTO] Invoice #{res.attributes["docid"].value} was pushed and return is #{res.as_json.to_h.inspect}") Setting.directo_monthly_number_last = directo_next
Nokogiri::XML(response).css("Result").each do |res|
Directo.create!(request: data, response: res.as_json.to_h, invoice_number: directo_next)
Rails.logger.info("[DIRECTO] Invoice #{res.attributes["docid"].value} was pushed and return is #{res.as_json.to_h.inspect}")
end
end end
else else
Rails.logger.info("[DIRECTO] Registrar #{registrar.id} has nothing to be sent to Directo") Rails.logger.info("[DIRECTO] Registrar #{registrar.id} has nothing to be sent to Directo")

View file

@ -7,6 +7,8 @@ class Domain < ActiveRecord::Base
attr_accessor :roles attr_accessor :roles
attr_accessor :legal_document_id
# TODO: whois requests ip whitelist for full info for own domains and partial info for other domains # TODO: whois requests ip whitelist for full info for own domains and partial info for other domains
# TODO: most inputs should be trimmed before validatation, probably some global logic? # TODO: most inputs should be trimmed before validatation, probably some global logic?
@ -345,7 +347,8 @@ class Domain < ActiveRecord::Base
end end
# state change shouln't be # state changes may be done low-level - no validation
# in this metod we still save PaperTrail log.
def clean_pendings_lowlevel def clean_pendings_lowlevel
statuses.delete(DomainStatus::PENDING_DELETE_CONFIRMATION) statuses.delete(DomainStatus::PENDING_DELETE_CONFIRMATION)
statuses.delete(DomainStatus::PENDING_UPDATE) statuses.delete(DomainStatus::PENDING_UPDATE)
@ -354,13 +357,23 @@ class Domain < ActiveRecord::Base
status_notes[DomainStatus::PENDING_UPDATE] = '' status_notes[DomainStatus::PENDING_UPDATE] = ''
status_notes[DomainStatus::PENDING_DELETE] = '' status_notes[DomainStatus::PENDING_DELETE] = ''
update_columns( hash = {
registrant_verification_token: nil, registrant_verification_token: nil,
registrant_verification_asked_at: nil, registrant_verification_asked_at: nil,
pending_json: {}, pending_json: {},
status_notes: status_notes, status_notes: status_notes,
statuses: statuses.presence || [DomainStatus::OK] statuses: statuses.presence || [DomainStatus::OK],
) # need this column in order to update PaperTrail version properly
updated_at: Time.now.utc
}
# PaperTrail
self.attributes = hash
record_update
clear_version_instance!
reset_transaction_id
update_columns(hash)
end end
def pending_update! def pending_update!
@ -384,6 +397,7 @@ class Domain < ActiveRecord::Base
self.registrant_verification_token = token self.registrant_verification_token = token
self.registrant_verification_asked_at = asked_at self.registrant_verification_asked_at = asked_at
set_pending_update set_pending_update
touch_always_version
pending_json['new_registrant_id'] = new_registrant_id pending_json['new_registrant_id'] = new_registrant_id
pending_json['new_registrant_email'] = new_registrant_email pending_json['new_registrant_email'] = new_registrant_email
pending_json['new_registrant_name'] = new_registrant_name pending_json['new_registrant_name'] = new_registrant_name
@ -464,7 +478,8 @@ class Domain < ActiveRecord::Base
def validate_nameserver_ips def validate_nameserver_ips
nameservers.to_a.reject(&:marked_for_destruction?).each do |ns| nameservers.to_a.reject(&:marked_for_destruction?).each do |ns|
next unless ns.hostname.end_with?(".#{name}") next unless ns.hostname.end_with?(".#{name}")
next if ns.ipv4.present? next if ns.ipv4.present? || ns.ipv6.present?
errors.add(:nameservers, :invalid) if errors[:nameservers].blank? errors.add(:nameservers, :invalid) if errors[:nameservers].blank?
ns.errors.add(:ipv4, :blank) ns.errors.add(:ipv4, :blank)
end end
@ -561,7 +576,7 @@ class Domain < ActiveRecord::Base
statuses << DomainStatus::SERVER_MANUAL_INZONE statuses << DomainStatus::SERVER_MANUAL_INZONE
end end
self.force_delete_at = Time.zone.now + Setting.redemption_grace_period.days unless force_delete_at self.force_delete_at = (Time.zone.now + (Setting.redemption_grace_period.days + 1.day)).utc.beginning_of_day unless force_delete_at
transaction do transaction do
save!(validate: false) save!(validate: false)
registrar.messages.create!( registrar.messages.create!(
@ -590,7 +605,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 + 1.day)).utc.beginning_of_day
self.statuses |= [DomainStatus::EXPIRED] self.statuses |= [DomainStatus::EXPIRED]
end end
@ -598,7 +613,7 @@ class Domain < ActiveRecord::Base
# TODO: currently valid_to attribute update logic is open # TODO: currently valid_to attribute update logic is open
# self.valid_to = valid_from + self.class.convert_period_to_time(period, period_unit) # self.valid_to = valid_from + self.class.convert_period_to_time(period, period_unit)
self.outzone_at = Time.zone.now + Setting.expire_warning_period.days self.outzone_at = Time.zone.now + Setting.expire_warning_period.days
self.delete_at = Time.zone.now + Setting.redemption_grace_period.days self.delete_at = (Time.zone.now + (Setting.redemption_grace_period.days + 1.day)).utc.beginning_of_day
statuses << DomainStatus::EXPIRED statuses << DomainStatus::EXPIRED
end end
@ -641,16 +656,7 @@ class Domain < ActiveRecord::Base
end end
def pending_update_prohibited? def pending_update_prohibited?
(statuses_was & [ (statuses_was & DomainStatus::UPDATE_PROHIBIT_STATES).present?
DomainStatus::PENDING_DELETE_CONFIRMATION,
DomainStatus::CLIENT_UPDATE_PROHIBITED,
DomainStatus::SERVER_UPDATE_PROHIBITED,
DomainStatus::PENDING_CREATE,
DomainStatus::PENDING_UPDATE,
DomainStatus::PENDING_DELETE,
DomainStatus::PENDING_RENEW,
DomainStatus::PENDING_TRANSFER
]).present?
end end
def set_pending_update def set_pending_update
@ -674,17 +680,7 @@ class Domain < ActiveRecord::Base
end end
def pending_delete_prohibited? def pending_delete_prohibited?
(statuses_was & [ (statuses_was & DomainStatus::DELETE_PROHIBIT_STATES).present?
DomainStatus::CLIENT_DELETE_PROHIBITED,
DomainStatus::SERVER_DELETE_PROHIBITED,
DomainStatus::CLIENT_UPDATE_PROHIBITED,
DomainStatus::SERVER_UPDATE_PROHIBITED,
DomainStatus::PENDING_CREATE,
DomainStatus::PENDING_RENEW,
DomainStatus::PENDING_TRANSFER,
DomainStatus::PENDING_UPDATE,
DomainStatus::PENDING_DELETE
]).present?
end end
# let's use positive method names # let's use positive method names
@ -725,8 +721,10 @@ class Domain < ActiveRecord::Base
log[:admin_contacts] = admin_contact_ids log[:admin_contacts] = admin_contact_ids
log[:tech_contacts] = tech_contact_ids log[:tech_contacts] = tech_contact_ids
log[:nameservers] = nameserver_ids log[:nameservers] = nameserver_ids
log[:dnskeys] = dnskey_ids
log[:domain_statuses]= domain_status_ids
log[:legal_documents]= [legal_document_id]
log[:registrant] = [registrant_id] log[:registrant] = [registrant_id]
log[:domain_statuses] = domain_status_ids
log log
end end

View file

@ -68,25 +68,27 @@ class DomainCron
marked marked
end end
def self.start_delete_period #doing nothing, deprecated
begin
STDOUT << "#{Time.zone.now.utc} - Setting delete_candidate to domains\n" unless Rails.env.test?
d = Domain.where('delete_at <= ?', Time.zone.now) def self.start_delete_period
marked = 0 # begin
real = 0 # STDOUT << "#{Time.zone.now.utc} - Setting delete_candidate to domains\n" unless Rails.env.test?
d.each do |domain| #
next unless domain.delete_candidateable? # d = Domain.where('delete_at <= ?', Time.zone.now)
real += 1 # marked = 0
domain.statuses << DomainStatus::DELETE_CANDIDATE # real = 0
STDOUT << "#{Time.zone.now.utc} DomainCron.start_delete_period: ##{domain.id} (#{domain.name}) #{domain.changes}\n" unless Rails.env.test? # d.each do |domain|
::PaperTrail.whodunnit = "cron - #{__method__}" # next unless domain.delete_candidateable?
domain.save(validate: false) and marked += 1 # real += 1
end # domain.statuses << DomainStatus::DELETE_CANDIDATE
ensure # the operator should see what was accomplished # STDOUT << "#{Time.zone.now.utc} DomainCron.start_delete_period: ##{domain.id} (#{domain.name})\n" unless Rails.env.test?
STDOUT << "#{Time.zone.now.utc} - Finished setting delete_candidate - #{marked} out of #{real} successfully set\n" unless Rails.env.test? # ::PaperTrail.whodunnit = "cron - #{__method__}"
end # domain.save(validate: false) and marked += 1
marked # end
# ensure # the operator should see what was accomplished
# STDOUT << "#{Time.zone.now.utc} - Finished setting delete_candidate - #{marked} out of #{real} successfully set\n" unless Rails.env.test?
# end
# marked
end end
def self.destroy_delete_candidates def self.destroy_delete_candidates
@ -99,10 +101,23 @@ class DomainCron
destroy_with_message x destroy_with_message x
STDOUT << "#{Time.zone.now.utc} Domain.destroy_delete_candidates: by deleteCandidate ##{x.id} (#{x.name})\n" unless Rails.env.test? STDOUT << "#{Time.zone.now.utc} Domain.destroy_delete_candidates: by deleteCandidate ##{x.id} (#{x.name})\n" unless Rails.env.test?
c += 1 Domain.where('delete_at <= ?', Time.zone.now).each do |x|
next unless x.delete_candidateable?
x.statuses << DomainStatus::DELETE_CANDIDATE
# If domain successfully saved, add it to delete schedule
if x.save(validate: false)
::PaperTrail.whodunnit = "cron - #{__method__}"
DomainDeleteJob.enqueue(x.id, run_at: rand(((24*60) - (DateTime.now.hour * 60 + DateTime.now.minute))).minutes.from_now)
STDOUT << "#{Time.zone.now.utc} Domain.destroy_delete_candidates: job added by deleteCandidate status ##{x.id} (#{x.name})\n" unless Rails.env.test?
c += 1
end
end end
Domain.where('force_delete_at <= ?', Time.zone.now).each do |x| Domain.where('force_delete_at <= ?', Time.zone.now).each do |x|
DomainDeleteJob.enqueue(x.id, run_at: rand(((24*60) - (DateTime.now.hour * 60 + DateTime.now.minute))).minutes.from_now)
STDOUT << "#{Time.zone.now.utc} DomainCron.destroy_delete_candidates: job added by force delete time ##{x.id} (#{x.name})\n" unless Rails.env.test?
::PaperTrail.whodunnit = "cron - #{__method__} case force_deleted_at" ::PaperTrail.whodunnit = "cron - #{__method__} case force_deleted_at"
WhoisRecord.where(domain_id: x.id).destroy_all WhoisRecord.where(domain_id: x.id).destroy_all
destroy_with_message x destroy_with_message x
@ -110,7 +125,7 @@ class DomainCron
c += 1 c += 1
end end
STDOUT << "#{Time.zone.now.utc} - Successfully destroyed #{c} domains\n" unless Rails.env.test? STDOUT << "#{Time.zone.now.utc} - Job destroy added for #{c} domains\n" unless Rails.env.test?
end end
# rubocop: enable Metrics/AbcSize # rubocop: enable Metrics/AbcSize

View file

@ -21,27 +21,6 @@ class DomainMailModel
compose compose
end end
def registrant_updated_notification_for_new_registrant
registrant
subject(:registrant_updated_notification_for_new_registrant_subject)
domain_info
compose
end
def registrant_updated_notification_for_old_registrant
registrant_pending
registrant_old
subject(:registrant_updated_notification_for_old_registrant_subject)
new_registrant = Registrant.find @domain.pending_json['new_registrant_id']
@params[:registrant_name] = new_registrant.name
@params[:registrant_ident] = new_registrant.ident
@params[:registrant_priv] = new_registrant.priv?
@params[:registrant_email] = new_registrant.email
@params[:registrant_street] = new_registrant.street
@params[:registrant_city] = new_registrant.city
@params[:registrant_country] = new_registrant.country.name
compose
end
def pending_update_rejected_notification_for_new_registrant def pending_update_rejected_notification_for_new_registrant
registrant_pending registrant_pending

View file

@ -95,6 +95,29 @@ class DomainStatus < ActiveRecord::Base
SERVER_ADMIN_CHANGE_PROHIBITED, SERVER_TECH_CHANGE_PROHIBITED SERVER_ADMIN_CHANGE_PROHIBITED, SERVER_TECH_CHANGE_PROHIBITED
] ]
UPDATE_PROHIBIT_STATES = [
DomainStatus::PENDING_DELETE_CONFIRMATION,
DomainStatus::CLIENT_UPDATE_PROHIBITED,
DomainStatus::SERVER_UPDATE_PROHIBITED,
DomainStatus::PENDING_CREATE,
DomainStatus::PENDING_UPDATE,
DomainStatus::PENDING_DELETE,
DomainStatus::PENDING_RENEW,
DomainStatus::PENDING_TRANSFER
]
DELETE_PROHIBIT_STATES = [
DomainStatus::CLIENT_DELETE_PROHIBITED,
DomainStatus::SERVER_DELETE_PROHIBITED,
DomainStatus::CLIENT_UPDATE_PROHIBITED,
DomainStatus::SERVER_UPDATE_PROHIBITED,
DomainStatus::PENDING_CREATE,
DomainStatus::PENDING_RENEW,
DomainStatus::PENDING_TRANSFER,
DomainStatus::PENDING_UPDATE,
DomainStatus::PENDING_DELETE
]
def epp_code_map def epp_code_map
{ {
'2302' => [ # Object exists '2302' => [ # Object exists

View file

@ -37,10 +37,7 @@ class Epp::Contact < Contact
at[:country_code] = f.css('postalInfo addr cc').text if f.css('postalInfo addr cc').present? at[:country_code] = f.css('postalInfo addr cc').text if f.css('postalInfo addr cc').present?
at[:auth_info] = f.css('authInfo pw').text if f.css('authInfo pw').present? at[:auth_info] = f.css('authInfo pw').text if f.css('authInfo pw').present?
legal_frame = f.css('legalDocument').first
if legal_frame.present?
at[:legal_documents_attributes] = legal_document_attrs(legal_frame)
end
at.merge!(ident_attrs(f.css('ident').first)) if new_record at.merge!(ident_attrs(f.css('ident').first)) if new_record
at at
end end
@ -104,6 +101,7 @@ class Epp::Contact < Contact
res res
end end
end end
delegate :ident_attr_valid?, to: :class delegate :ident_attr_valid?, to: :class
@ -134,6 +132,9 @@ class Epp::Contact < Contact
'2302' => [ # Object exists '2302' => [ # Object exists
[:code, :epp_id_taken] [:code, :epp_id_taken]
], ],
'2304' => [ # Object status prohibits operation
[:ident_type, :epp_ident_type_invalid, { value: { obj: 'code', val: code}, interpolation: {code: code}}]
],
'2305' => [ # Association exists '2305' => [ # Association exists
[:domains, :exist] [:domains, :exist]
], ],
@ -143,7 +144,7 @@ class Epp::Contact < Contact
end end
# rubocop:disable Metrics/AbcSize # rubocop:disable Metrics/AbcSize
def update_attributes(frame) def update_attributes(frame, current_user)
return super if frame.blank? return super if frame.blank?
at = {}.with_indifferent_access at = {}.with_indifferent_access
at.deep_merge!(self.class.attrs_from(frame.css('chg'), new_record: false)) at.deep_merge!(self.class.attrs_from(frame.css('chg'), new_record: false))
@ -152,8 +153,14 @@ class Epp::Contact < Contact
at[:statuses] = statuses - statuses_attrs(frame.css('rem'), 'rem') + statuses_attrs(frame.css('add'), 'add') at[:statuses] = statuses - statuses_attrs(frame.css('rem'), 'rem') + statuses_attrs(frame.css('add'), 'add')
end end
legal_frame = frame.css('legalDocument').first # legal_frame = frame.css('legalDocument').first
at[:legal_documents_attributes] = self.class.legal_document_attrs(legal_frame) # at[:legal_documents_attributes] = self.class.legal_document_attrs(legal_frame)
if doc = attach_legal_document(Epp::Domain.parse_legal_document_from_frame(frame))
frame.css("legalDocument").first.content = doc.path if doc && doc.persisted?
self.legal_document_id = doc.id
end
self.deliver_emails = true # turn on email delivery for epp self.deliver_emails = true # turn on email delivery for epp
@ -169,6 +176,8 @@ class Epp::Contact < Contact
elsif ident_type == "birthday" && !ident[/\A\d{4}-\d{2}-\d{2}\z/] && (Date.parse(ident) rescue false) elsif ident_type == "birthday" && !ident[/\A\d{4}-\d{2}-\d{2}\z/] && (Date.parse(ident) rescue false)
at.merge!(ident: ident_frame.text) at.merge!(ident: ident_frame.text)
at.merge!(ident_country_code: ident_frame.attr('cc')) if ident_frame.attr('cc').present? at.merge!(ident_country_code: ident_frame.attr('cc')) if ident_frame.attr('cc').present?
elsif ident_type == "birthday" && ident_country_code.blank?
at.merge!(ident_country_code: ident_frame.attr('cc'))
elsif ident_type.blank? && ident_country_code.blank? elsif ident_type.blank? && ident_country_code.blank?
at.merge!(ident_type: ident_frame.attr('type')) at.merge!(ident_type: ident_frame.attr('type'))
at.merge!(ident_country_code: ident_frame.attr('cc')) if ident_frame.attr('cc').present? at.merge!(ident_country_code: ident_frame.attr('cc')) if ident_frame.attr('cc').present?
@ -180,6 +189,9 @@ class Epp::Contact < Contact
end end
end end
self.upid = current_user.registrar.id if current_user.registrar
self.up_date = Time.zone.now
super(at) super(at)
end end
# rubocop:enable Metrics/AbcSize # rubocop:enable Metrics/AbcSize
@ -217,4 +229,29 @@ class Epp::Contact < Contact
status_list status_list
end end
def attach_legal_document(legal_document_data)
return unless legal_document_data
legal_documents.create(
document_type: legal_document_data[:type],
body: legal_document_data[:body]
)
end
def add_legal_file_to_new frame
legal_document_data = Epp::Domain.parse_legal_document_from_frame(frame)
return unless legal_document_data
doc = LegalDocument.create(
documentable_type: Contact,
document_type: legal_document_data[:type],
body: legal_document_data[:body]
)
self.legal_documents = [doc]
frame.css("legalDocument").first.content = doc.path if doc && doc.persisted?
self.legal_document_id = doc.id
end
end end

View file

@ -11,7 +11,8 @@ class Epp::Domain < Domain
return if is_admin # this bad hack for 109086524, refactor later return if is_admin # this bad hack for 109086524, refactor later
return true if is_transfer || is_renewal return true if is_transfer || is_renewal
return unless update_prohibited? || delete_prohibited? return unless update_prohibited? || delete_prohibited?
add_epp_error('2304', nil, nil, I18n.t(:object_status_prohibits_operation)) stat = (statuses & (DomainStatus::UPDATE_PROHIBIT_STATES + DomainStatus::DELETE_PROHIBIT_STATES)).first
add_epp_error('2304', 'status', stat, I18n.t(:object_status_prohibits_operation))
false false
end end
@ -39,29 +40,12 @@ class Epp::Domain < Domain
before_save :link_contacts before_save :link_contacts
def link_contacts def link_contacts
# Based on bullet report #TODO: cleanup cache if we think to cache dynamic statuses
if new_record?
# new record does not have correct instance contacts entries thanks to epp
unlinked_contacts = [registrant]
unlinked_contacts << admin_domain_contacts.map(&:contact)
unlinked_contacts << tech_domain_contacts.map(&:contact)
unlinked_contacts.flatten!
else
unlinked_contacts = contacts.select { |c| !c.linked? } # speed up a bit
end
unlinked_contacts.each do |uc|
uc.domains_present = true # no need to fetch domains again
uc.save(validate: false)
end
end end
after_destroy :unlink_contacts after_destroy :unlink_contacts
def unlink_contacts def unlink_contacts
contacts.each do |c| #TODO: cleanup cache if we think to cache dynamic statuses
c.domains_present = false
c.save(validate: false)
end
end end
class << self class << self
@ -133,7 +117,8 @@ class Epp::Domain < Domain
[:base, :ds_data_not_allowed], [:base, :ds_data_not_allowed],
[:base, :key_data_not_allowed], [:base, :key_data_not_allowed],
[:period, :not_a_number], [:period, :not_a_number],
[:period, :not_an_integer] [:period, :not_an_integer],
[:registrant, :cannot_be_missing]
], ],
'2308' => [ '2308' => [
[:base, :domain_name_blocked, { value: { obj: 'name', val: name_dirty } }] [:base, :domain_name_blocked, { value: { obj: 'name', val: name_dirty } }]
@ -155,10 +140,11 @@ class Epp::Domain < Domain
def attrs_from(frame, current_user, action = nil) def attrs_from(frame, current_user, action = nil)
at = {}.with_indifferent_access at = {}.with_indifferent_access
code = frame.css('registrant').first.try(:text) registrant_frame = frame.css('registrant').first
code = registrant_frame.try(:text)
if code.present? if code.present?
if action == 'chg' && registrant_change_prohibited? if action == 'chg' && registrant_change_prohibited?
add_epp_error('2304', nil, DomainStatus::SERVER_REGISTRANT_CHANGE_PROHIBITED, I18n.t(:object_status_prohibits_operation)) add_epp_error('2304', "status", DomainStatus::SERVER_REGISTRANT_CHANGE_PROHIBITED, I18n.t(:object_status_prohibits_operation))
end end
regt = Registrant.find_by(code: code) regt = Registrant.find_by(code: code)
if regt if regt
@ -166,7 +152,10 @@ class Epp::Domain < Domain
else else
add_epp_error('2303', 'registrant', code, [:registrant, :not_found]) add_epp_error('2303', 'registrant', code, [:registrant, :not_found])
end end
end else
add_epp_error('2306', nil, nil, [:registrant, :cannot_be_missing])
end if registrant_frame
at[:name] = frame.css('name').text if new_record? at[:name] = frame.css('name').text if new_record?
at[:registrar_id] = current_user.registrar.try(:id) at[:registrar_id] = current_user.registrar.try(:id)
@ -195,9 +184,27 @@ class Epp::Domain < Domain
end end
at[:dnskeys_attributes] = dnskeys_attrs(dnskey_frame, action) at[:dnskeys_attributes] = dnskeys_attrs(dnskey_frame, action)
at[:legal_documents_attributes] = legal_document_from(frame)
at at
end end
# Adding legal doc to domain and
# if something goes wrong - raise Rollback error
def add_legal_file_to_new frame
legal_document_data = Epp::Domain.parse_legal_document_from_frame(frame)
return unless legal_document_data
doc = LegalDocument.create(
documentable_type: Domain,
document_type: legal_document_data[:type],
body: legal_document_data[:body]
)
self.legal_documents = [doc]
frame.css("legalDocument").first.content = doc.path if doc && doc.persisted?
self.legal_document_id = doc.id
end
# rubocop: enable Metrics/PerceivedComplexity # rubocop: enable Metrics/PerceivedComplexity
# rubocop: enable Metrics/CyclomaticComplexity # rubocop: enable Metrics/CyclomaticComplexity
# rubocop: enable Metrics/MethodLength # rubocop: enable Metrics/MethodLength
@ -457,15 +464,6 @@ class Epp::Domain < Domain
status_list status_list
end end
def legal_document_from(frame)
ld = frame.css('legalDocument').first
return [] unless ld
[{
body: ld.text,
document_type: ld['type']
}]
end
# rubocop: disable Metrics/AbcSize # rubocop: disable Metrics/AbcSize
# rubocop: disable Metrics/CyclomaticComplexity # rubocop: disable Metrics/CyclomaticComplexity
@ -477,6 +475,7 @@ class Epp::Domain < Domain
if doc = attach_legal_document(Epp::Domain.parse_legal_document_from_frame(frame)) if doc = attach_legal_document(Epp::Domain.parse_legal_document_from_frame(frame))
frame.css("legalDocument").first.content = doc.path if doc && doc.persisted? frame.css("legalDocument").first.content = doc.path if doc && doc.persisted?
self.legal_document_id = doc.id
end end
at_add = attrs_from(frame.css('add'), current_user, 'add') at_add = attrs_from(frame.css('add'), current_user, 'add')
@ -489,6 +488,11 @@ class Epp::Domain < Domain
# at[:statuses] += at_add[:domain_statuses_attributes] # at[:statuses] += at_add[:domain_statuses_attributes]
if errors.empty? && verify
self.upid = current_user.registrar.id if current_user.registrar
self.up_date = Time.zone.now
end
if registrant_id && registrant.code == frame.css('registrant') if registrant_id && registrant.code == frame.css('registrant')
throw :epp_error, { throw :epp_error, {
@ -515,18 +519,22 @@ class Epp::Domain < Domain
preclean_pendings preclean_pendings
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'])
old_registrant_id = registrant_id
self.deliver_emails = true # turn on email delivery self.deliver_emails = true # turn on email delivery
self.statuses.delete(DomainStatus::PENDING_UPDATE) self.statuses.delete(DomainStatus::PENDING_UPDATE)
self.upid = user.registrar.id if user.registrar
self.up_date = Time.zone.now
send_mail :registrant_updated_notification_for_old_registrant
return unless update(frame, user, false) return unless update(frame, user, false)
clean_pendings! clean_pendings!
send_mail :registrant_updated_notification_for_new_registrant
WhoisRecord.find_by(domain_id: id).save # need to reload model
save! # for notification if everything fails save! # for notification if everything fails
WhoisRecord.find_by(domain_id: id).save # need to reload model
DomainMailer.registrant_updated_notification_for_old_registrant(id, old_registrant_id, registrant_id, true).deliver
DomainMailer.registrant_updated_notification_for_new_registrant(id, old_registrant_id, registrant_id, true).deliver
true true
end end
@ -575,7 +583,7 @@ class Epp::Domain < Domain
msg: I18n.t(:object_status_prohibits_operation) msg: I18n.t(:object_status_prohibits_operation)
} unless pending_deletable? } unless pending_deletable?
self.delete_at = Time.zone.now + Setting.redemption_grace_period.days self.delete_at = (Time.zone.now + (Setting.redemption_grace_period.days + 1.day)).utc.beginning_of_day
set_pending_delete set_pending_delete
set_server_hold if server_holdable? set_server_hold if server_holdable?
save(validate: false) save(validate: false)

View file

@ -1,4 +1,7 @@
class LegalDocument < ActiveRecord::Base class LegalDocument < ActiveRecord::Base
include EppErrors
MIN_BODY_SIZE = (1.37 * 3.kilobytes).ceil
if ENV['legal_document_types'].present? if ENV['legal_document_types'].present?
TYPES = ENV['legal_document_types'].split(',').map(&:strip) TYPES = ENV['legal_document_types'].split(',').map(&:strip)
else else
@ -10,11 +13,22 @@ class LegalDocument < ActiveRecord::Base
belongs_to :documentable, polymorphic: true belongs_to :documentable, polymorphic: true
validates :body, length: { minimum: (1.37 * 8.kilobytes).ceil }, if: ->(file){ file.path.blank? && !Rails.env.staging?} validate :val_body_length, if: ->(file){ file.path.blank? && !Rails.env.staging?}
before_create :add_creator before_create :add_creator
before_save :save_to_filesystem before_save :save_to_filesystem
def epp_code_map
{
'2306' => [
[:body, :length]
]
}
end
def val_body_length
errors.add(:body, :length) if body.nil? || body.size < MIN_BODY_SIZE
end
def save_to_filesystem def save_to_filesystem

View file

@ -12,4 +12,8 @@ class Message < ActiveRecord::Base
self.queued = false self.queued = false
save save
end end
def name
"-"
end
end end

View file

@ -8,7 +8,7 @@ class Nameserver < ActiveRecord::Base
# scope :owned_by_registrar, -> (registrar) { joins(:domain).where('domains.registrar_id = ?', registrar.id) } # scope :owned_by_registrar, -> (registrar) { joins(:domain).where('domains.registrar_id = ?', registrar.id) }
# rubocop: disable Metrics/LineLength # rubocop: disable Metrics/LineLength
validates :hostname, format: { with: /\A(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])\z/ } validates :hostname, format: { with: /\A(([a-zA-Z0-9]|[a-zA-ZäöüõšžÄÖÜÕŠŽ0-9][a-zA-ZäöüõšžÄÖÜÕŠŽ0-9\-]*[a-zA-ZäöüõšžÄÖÜÕŠŽ0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])\z/ }
# validates :ipv4, format: { with: /\A(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\z/, allow_blank: true } # validates :ipv4, format: { with: /\A(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\z/, allow_blank: true }
# validates :ipv6, format: { with: /(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]).){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]).){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))/, allow_blank: true } # validates :ipv6, format: { with: /(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]).){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]).){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))/, allow_blank: true }
validate :val_ipv4 validate :val_ipv4
@ -16,20 +16,23 @@ class Nameserver < ActiveRecord::Base
# rubocop: enable Metrics/LineLength # rubocop: enable Metrics/LineLength
before_validation :normalize_attributes before_validation :normalize_attributes
before_validation :check_puny_symbols
before_validation :check_label_length
delegate :name, to: :domain, prefix: true delegate :name, to: :domain, prefix: true
def epp_code_map def epp_code_map
{ {
'2302' => [ '2302' => [
[:hostname, :taken, { value: { obj: 'hostAttr', val: hostname } }] [:hostname, :taken, { value: { obj: 'hostAttr', val: {'hostName': hostname} } }]
], ],
'2005' => [ '2005' => [
[:hostname, :invalid, { value: { obj: 'hostAttr', val: hostname } }], [:hostname, :invalid, { value: { obj: 'hostAttr', val: hostname } }],
[:hostname, :puny_to_long, { value: { obj: 'hostAttr', val: hostname } }],
[:ipv4, :invalid, { value: { obj: 'hostAddr', val: ipv4 } }], [:ipv4, :invalid, { value: { obj: 'hostAddr', val: ipv4 } }],
[:ipv6, :invalid, { value: { obj: 'hostAddr', val: ipv6 } }] [:ipv6, :invalid, { value: { obj: 'hostAddr', val: ipv6 } }]
], ],
'2306' => [ '2003' => [
[:ipv4, :blank] [:ipv4, :blank]
] ]
} }
@ -41,10 +44,26 @@ class Nameserver < ActiveRecord::Base
self.ipv6 = Array(ipv6).reject(&:blank?).map(&:strip).map(&:upcase) self.ipv6 = Array(ipv6).reject(&:blank?).map(&:strip).map(&:upcase)
end end
def check_label_length
hostname_puny.split('.').each do |label|
errors.add(:hostname, :puny_to_long) if label.length > 63
end
end
def check_puny_symbols
regexp = /(\A|\.)..--/
errors.add(:hostname, :invalid) if hostname =~ regexp
end
def to_s def to_s
hostname hostname
end end
def hostname=(hostname)
self[:hostname] = SimpleIDN.to_unicode(hostname)
self[:hostname_puny] = SimpleIDN.to_ascii(hostname)
end
def val_ipv4 def val_ipv4
regexp = /\A(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\z/ regexp = /\A(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\z/
ipv4.to_a.each do |ip| ipv4.to_a.each do |ip|

View file

@ -30,10 +30,20 @@ class RegistrantUser < User
return false if issuer_organization != ACCEPTED_ISSUER return false if issuer_organization != ACCEPTED_ISSUER
idc_data.force_encoding('UTF-8') idc_data.force_encoding('UTF-8')
identity_code = idc_data.scan(/serialNumber=(\d+)/).flatten.first
country = idc_data.scan(/^\/C=(.{2})/).flatten.first # handling here new and old mode
first_name = idc_data.scan(%r{/GN=(.+)/serialNumber}).flatten.first if idc_data.starts_with?("/")
last_name = idc_data.scan(%r{/SN=(.+)/GN}).flatten.first identity_code = idc_data.scan(/serialNumber=(\d+)/).flatten.first
country = idc_data.scan(/^\/C=(.{2})/).flatten.first
first_name = idc_data.scan(%r{/GN=(.+)/serialNumber}).flatten.first
last_name = idc_data.scan(%r{/SN=(.+)/GN}).flatten.first
else
parse_str = "," + idc_data
identity_code = parse_str.scan(/,serialNumber=(\d+)/).flatten.first
country = parse_str.scan(/,C=(.{2})/).flatten.first
first_name = parse_str.scan(/,GN=([^,]+)/).flatten.first
last_name = parse_str.scan(/,SN=([^,]+)/).flatten.first
end
u = where(registrant_ident: "#{country}-#{identity_code}").first_or_create u = where(registrant_ident: "#{country}-#{identity_code}").first_or_create
u.username = "#{first_name} #{last_name}" u.username = "#{first_name} #{last_name}"

View file

@ -65,7 +65,7 @@ class ReservedDomain < ActiveRecord::Base
def generate_json def generate_json
h = HashWithIndifferentAccess.new h = HashWithIndifferentAccess.new
h[:name] = self.name h[:name] = self.name
h[:status] = 'Reserved' h[:status] = ['Reserved']
h h
end end

View file

@ -56,7 +56,7 @@
%thead %thead
%tr %tr
%th{class: 'col-xs-2'} %th{class: 'col-xs-2'}
= sort_link(@q, 'registrar') = sort_link(@q, 'account_registrar_code', t(:registrar))
%th{class: 'col-xs-3'} %th{class: 'col-xs-3'}
= sort_link(@q, 'description') = sort_link(@q, 'description')
%th{class: 'col-xs-2'} %th{class: 'col-xs-2'}

View file

@ -0,0 +1,86 @@
= render 'shared/title', name: t(:contacts)
.row
.col-md-12
= search_form_for [:admin, @q], html: { style: 'margin-bottom: 0;', class: 'js-form', autocomplete: 'off' } do |f|
.row
.col-md-3
.form-group
= f.label :name
= f.search_field :name, value: params[:q][:name], class: 'form-control', placeholder: t(:name)
.col-md-3
.form-group
= f.label :id
= f.search_field :code, value: params[:q][:code], class: 'form-control', placeholder: t(:id)
.col-md-3
.form-group
= f.label :ident
= f.search_field :ident, value: params[:q][:ident], class: 'form-control', placeholder: t(:ident)
.col-md-3
.form-group
= label_tag :action
= select_tag '[q][event]', options_for_select([['Update', 'update'], ['Destroy', 'destroy'], ['Create', 'create']], params[:q][:event]), { include_blank:true, multiple: false, placeholder: t(:choose), class: 'form-control js-combobox' }
.row
.col-md-3
.col-md-3
.col-md-3
.form-group
= label_tag t(:results_per_page)
= text_field_tag :results_per_page, params[:results_per_page], class: 'form-control', placeholder: t(:results_per_page)
.col-md-3{style: 'padding-top: 25px;'}
%button.btn.btn-primary
&nbsp;
%span.glyphicon.glyphicon-search
&nbsp;
%button.btn.btn-default.js-reset-form
= t(:clear_fields)
%hr
.row
.col-md-12
.table-responsive
%table.table.table-hover.table-bordered.table-condensed
%thead
%tr
%th{class: 'col-xs-2'}
= t(:name)
%th{class: 'col-xs-2'}
= t(:id)
%th{class: 'col-xs-2'}
= t(:ident)
%th{class: 'col-xs-2'}
= t(:registrar)
%th{class: 'col-xs-2'}
= t(:action)
%th{class: 'col-xs-2'}
= t(:created_at)
%tbody
- @versions.each do |version|
- if version
- contact = Contact.new(version.object.to_h)
- version.object_changes.to_h.each{|k,v| contact[k]=v.last}
%tr
%td= link_to(contact.name, admin_contact_version_path(version.id))
%td= contact.code
%td= ident_for(contact)
%td
- if contact.registrar
= link_to(contact.registrar, admin_registrar_path(contact.registrar))
%td= version.event
%td= l(version.created_at, format: :short)
.row
.col-md-6
= paginate @versions
.col-md-6.text-right
.pagination
= t(:result_count, count: @versions.total_count)
:coffee
$(".js-reset-form").on "click", (e) ->
e.preventDefault();
window.location = "#{admin_contact_versions_path}"

View file

@ -0,0 +1,108 @@
- contact = Contact.new(@version.object.to_h)
- @version.object_changes.to_h.each{|k,v| contact[k]=v.last}
= render 'shared/title', name: contact.name
.row
.col-md-8
.panel.panel-default{:style => "min-height:420px;"}
.panel-heading
%h3.panel-title
= l(@version.created_at, format: :short)
= @version.event
= plain_username(@version.terminator)
.panel-body
%dl.dl-horizontal
%dt= t(:id)
%dd{class: changing_css_class(@version,"code")}
= contact.code
%dt= t(:statuses)
%dd{class: changing_css_class(@version,"statuses")}
= contact.statuses.join(", ")
%dt= t(:ident)
%dd{class: changing_css_class(@version,"ident_country_code", "ident_type", "ident")}
= ident_for(contact)
- if contact.email.present?
%dt= t(:email)
%dd{class: changing_css_class(@version,"email")}
= contact.email
- if contact.phone.present?
%dt= t(:phone)
%dd{class: changing_css_class(@version,"phone")}
= contact.phone
- if contact.fax.present?
%dt= t(:fax)
%dd{class: changing_css_class(@version,"fax")}
= contact.fax
%br
%dt= t(:created)
%dd{class: changing_css_class(@version,"created_at")}
= l(contact.created_at, format: :short)
%dt= t(:updated)
%dd{class: changing_css_class(@version,"updated_at")}
= l(contact.updated_at, format: :short)
%dt= t(:registrar)
%dd{class: changing_css_class(@version,"registrar_id")}
- if contact.registrar.present?
= link_to(contact.registrar, admin_registrar_path(contact.registrar))
%dl.dl-horizontal
- if contact.org_name.present?
%dt= t(:org_name)
%dd{class: changing_css_class(@version,"org_name")}= contact.org_name
- if contact.street.present?
%dt= t(:street)
%dd{class: changing_css_class(@version,"street")}= contact.street.to_s.gsub("\n", '<br>').html_safe
- if contact.city.present?
%dt= t(:city)
%dd{class: changing_css_class(@version,"city")}= contact.city
- if contact.zip.present?
%dt= t(:zip)
%dd{class: changing_css_class(@version,"zip")}= contact.zip
- if contact.state.present?
%dt= t(:state)
%dd{class: changing_css_class(@version,"state")}= contact.state
- if contact.country.present?
%dt= t(:country)
%dd{class: changing_css_class(@version,"country_code")}= contact.country
%span{:style => "padding-right:10px; float: right;"}
- if (prev = @versions_map[(@versions_map.index(@version.id) - 1)]) && @versions_map.index(@version.id) != 0
= link_to(t(:previous),
admin_contact_version_path(prev),
class: 'btn btn-primary')
- else
%a.btn.btn-primary.disabled{:href => "#"}
%span= t(:previous)
- if nxt = @versions_map[(@versions_map.index(@version.id) + 1)]
= link_to(t(:next),
admin_contact_version_path(nxt),
class: 'btn btn-default')
- else
%a.btn.btn-default.disabled{:href => "#"}
%span= t(:next)
.col-md-4
.panel.panel-default{:style => "min-height:450px;"}
%ul.nav.nav-pills.nav-stacked
- @versions.each do |vs|
%li{class: (vs.id == @version.id) && :active}
= link_to admin_contact_version_path(vs) do
= l(vs.created_at, format: :short)
= vs.event
%span{:style => "padding-left:10px; position: absolute; bottom: 10px;"}
= paginate @versions, theme: :admin

View file

@ -1,109 +0,0 @@
- statuses_link ||= false
- version ||= false
- domain ||= false
- pending_user ||= false
- if domain.present?
- if version # normal history
- children = HashWithIndifferentAccess.new(version.children)
- nameservers = Nameserver.where(id: children[:nameservers])
- tech_contacts = Contact.where(id: children[:tech_contacts])
- admin_contacts = Contact.where(id: children[:admin_contacts])
- registrant = Contact.where(id: children[:registrant])
- event = version.event
- creator = plain_username(version.terminator)
- else # pending history
- nameservers = domain.nameservers
- tech_contacts = domain.tech_contacts
- admin_contacts = domain.admin_contacts
- registrant = [domain.registrant]
- creator = pending_user.try(:username)
- event = 'pending'
%td
%p.nowrap
= l(domain.updated_at, format: :shorts)
- if statuses_link
%br= link_to t(:edit_statuses), edit_admin_domain_path(params[:domain_id])
%p.text-right
= event
%br
= creator
%td
%p
- if domain.statuses.present?
- domain.statuses.each do |s|
= s
- if domain.status_notes.present?
- notes = domain.status_notes[s]
- if notes
%br
%i= notes
%br
- if domain.pending_json.present?
%p
= link_to t(:pending_epp), '#', class: 'js-pending-toggle'
%td
%p
= "#{domain.period}#{domain.period_unit}"
%br
= "#{l(domain.valid_from, format: :date)}"
%br
= "#{l(domain.valid_to, format: :date)}"
%td
- if registrant
- registrant.each do |r|
%p
= r[:name]
= r[:phone]
= r[:email]
%p
= r[:code]
%td
- if admin_contacts
- admin_contacts.each do |ac|
%p
= ac[:name]
= ac[:phone]
= ac[:email]
%p
= ac[:code]
%td
- if tech_contacts
- tech_contacts.each do |tc|
%p
= tc[:name]
= tc[:phone]
= tc[:email]
%p
= tc[:code]
%td
%p
- if nameservers
- nameservers.each do |ns|
= ns[:hostname]
%br
= ns[:ipv4]
= ns[:ipv6]
%td
%p
= domain.registrar.name if domain.registrar
- if domain.pending_json.present?
%tr.js-pending{ style: 'display: none;' }
%td{colspan: 8}
= preserve do
%pre
- formatted_req = Nokogiri::XML(domain.pending_json['frame'])
- if formatted_req.errors.none?
= formatted_req
- else
= domain.pending_json['frame']

View file

@ -0,0 +1,92 @@
= render 'shared/title', name: t(:domains)
.row
.col-md-12
= search_form_for [:admin, @q], html: { style: 'margin-bottom: 0;', class: 'js-form', autocomplete: 'off' } do |f|
.row
.col-md-3
.form-group
= label_tag :name
= f.search_field :name, value: params[:q][:name], class: 'form-control', placeholder: t(:name)
.col-md-3
.form-group
= label_tag :registrant
= f.search_field :registrant, value: params[:q][:registrant], class: 'form-control', placeholder: t(:registrant)
.col-md-3
.form-group
= label_tag t(:registrar)
= f.search_field :registrar, value: params[:q][:registrar], class: 'form-control', placeholder: t(:registrant)
.col-md-3
.form-group
= label_tag :action
= select_tag '[q][event]', options_for_select([['Update', 'update'], ['Destroy', 'destroy'], ['Create', 'create']], params[:q][:event]), { include_blank:true, multiple: false, placeholder: t(:choose), class: 'form-control js-combobox' }
.row
.col-md-3
.col-md-3
.col-md-3
.form-group
= label_tag t(:results_per_page)
= text_field_tag :results_per_page, params[:results_per_page], class: 'form-control', placeholder: t(:results_per_page)
.col-md-3{style: 'padding-top: 25px;'}
%button.btn.btn-primary
&nbsp;
%span.glyphicon.glyphicon-search
&nbsp;
%button.btn.btn-default.js-reset-form
= t(:clear_fields)
%hr
.row
.col-md-12
.table-responsive
%table.table.table-hover.table-bordered.table-condensed
%thead
%tr
%th{class: 'col-xs-2'}
= t(:name)
%th{class: 'col-xs-2'}
= t(:registrant)
%th{class: 'col-xs-2'}
= t(:registrar)
%th{class: 'col-xs-2'}
= t(:action)
%th{class: 'col-xs-2'}
= t(:created_at)
%tbody
- @versions.each do |version|
- if version
- domain = Domain.new(version.object.to_h)
- version.object_changes.to_h.each{|k,v| domain[k]=v.last}
%tr
%td= link_to(domain.name, admin_domain_version_path(version.id))
%td
- if domain.registrant
= domain.registrant.name
- else
- contact = Contact.all_versions_for([domain.registrant_id], version.created_at).first
- if contact.nil? && ver = ContactVersion.where(item_id: domain.registrant_id).last
- contact = Contact.new(ver.object.to_h.merge(ver.object_changes.to_h.each_with_object({}){|(k,v), o| o[k]=v.last } ))
= contact.try(:name)
= "&#160;".html_safe
= "(#{t(:deleted)})"
%td
- if domain.registrar
= link_to(domain.registrar, admin_registrar_path(domain.registrar))
%td= version.event
%td= l(version.created_at, format: :short)
.row
.col-md-6
= paginate @versions
.col-md-6.text-right
.pagination
= t(:result_count, count: @versions.total_count)
:coffee
$(".js-reset-form").on "click", (e) ->
e.preventDefault();
window.location = "#{admin_domain_versions_path}"

View file

@ -0,0 +1,131 @@
- domain = Domain.new(@version.object.to_h)
- @version.object_changes.to_h.each{|k,v| domain[k]=v.last}
- if @version
- children = HashWithIndifferentAccess.new(@version.children)
- nameservers = Nameserver.all_versions_for(children[:nameservers], @version.created_at)
- dnskeys = Dnskey.all_versions_for(children[:dnskeys], @version.created_at)
- tech_contacts = Contact.all_versions_for(children[:tech_contacts], @version.created_at)
- admin_contacts = Contact.all_versions_for(children[:admin_contacts], @version.created_at)
- registrant = Contact.all_versions_for(children[:registrant], @version.created_at)
- event = @version.event
- creator = plain_username(@version.terminator)
= render 'shared/title', name: domain.name
.row
.col-md-8
.panel.panel-default{:style => "min-height:450px;"}
.panel-heading
%h3.panel-title
= l(@version.created_at, format: :short)
= event
= creator
.panel-body
%dl.dl-horizontal
%dt= t(:name)
- if !domain.name
- domain_name = Domain.find(@version.item_id).try(:name)
- else
- domain_name = domain.name
%dd= link_to(domain_name, admin_domain_path(@version.item_id))
%dt= t(:created)
%dd
= l(domain.created_at, format: :short)
%dt= t(:updated)
%dd
= l(domain.updated_at, format: :short)
%br
%dt= t(:statuses)
%dd{class: changing_css_class(@version,"statuses")}
- if domain.statuses.present?
- domain.statuses.each do |s|
= s
%dt= t(:registrant)
%dd{class: changing_css_class(@version,"registrant_id")}
- registrant.each do |r|
- link = r.version_loader ? admin_contact_version_path(r.version_loader.try(:id)) : admin_contact_path(r.id)
= link_to link, target: "contact_#{r.id}" do
= r[:name]
= r[:phone]
= r[:email]
= r[:code]
%br
%dt= t(:admin_contacts)
%dd
- admin_contacts.each do |r|
- link = r.version_loader ? admin_contact_version_path(r.version_loader.try(:id)) : admin_contact_path(r.id)
= link_to link, target: "contact_#{r.id}" do
= r[:name]
= r[:phone]
= r[:email]
= r[:code]
%br
%dt= t(:tech_contacts)
%dd
- tech_contacts.each do |r|
- link = r.version_loader ? admin_contact_version_path(r.version_loader.try(:id)) : admin_contact_path(r.id)
= link_to link, target: "contact_#{r.id}" do
= r[:name]
= r[:phone]
= r[:email]
= r[:code]
%br
%dt= t(:nameservers)
%dd
- nameservers.each do |ns|
= ns[:hostname]
= ns[:ipv4]
= ns[:ipv6]
%br
%dt= t(:dnskeys)
%dd
- dnskeys.each do |ns|
= ns[:flags]
= ns[:protocol]
= ns[:alg]
- if ns[:public_key].present?
\...#{ns[:public_key].to_s[-20,20]}
%br
- if domain.registrar
%dt= t(:registrar)
%dd{class: changing_css_class(@version,"registrar_id")}
= link_to admin_registrar_path(domain.registrar), target: "registrar_#{domain.registrar.id}" do
= domain.registrar.name
%span{:style => "margin: 20px 20px; clear:both;"}
- if (prev = @versions_map[(@versions_map.index(@version.id) - 1)]) && @versions_map.index(@version.id) != 0
= link_to(t(:previous),
admin_domain_version_path(prev),
class: 'btn btn-primary')
- else
%a.btn.btn-primary.disabled{:href => "#"}
%span= t(:previous)
- if nxt = @versions_map[(@versions_map.index(@version.id) + 1)]
= link_to(t(:next),
admin_domain_version_path(nxt),
class: 'btn btn-default')
- else
%a.btn.btn-default.disabled{:href => "#"}
%span= t(:next)
.col-md-4
.panel.panel-default{:style => "min-height:450px;"}
%ul.nav.nav-pills.nav-stacked
- @versions.each do |vs|
%li{class: (vs.id == @version.id) && :active}
= link_to admin_domain_version_path(vs) do
= l(vs.created_at, format: :short)
= vs.event
%span{:style => "padding-left:10px; position: absolute; bottom: 10px;"}
= paginate @versions, theme: :admin

View file

@ -0,0 +1,148 @@
-#- statuses_link ||= false
- version ||= false
- domain ||= false
- pending_user ||= false
- if domain.present?
- if version # normal history
- epp_req = ApiLog::EppLog.find_by(uuid: version.uuid).try(:request) if version.uuid
- children = HashWithIndifferentAccess.new(version.children)
- nameservers = Nameserver.all_versions_for(children[:nameservers], version.created_at)
- dnskeys = Dnskey.all_versions_for(children[:dnskeys], version.created_at)
- tech_contacts = Contact.all_versions_for(children[:tech_contacts], version.created_at)
- admin_contacts = Contact.all_versions_for(children[:admin_contacts], version.created_at)
- registrant = Contact.all_versions_for(children[:registrant], version.created_at)
- event = version.event
- creator = plain_username(version.terminator)
- whodunnit = version.try(:whodunnit)
- else # pending history
- epp_req = false
- nameservers = domain.nameservers
- dnskeys = domain.dnskeys
- tech_contacts = domain.tech_contacts
- admin_contacts = domain.admin_contacts
- registrant = domain.registrant
- unless registrant
- ver = ContactVersion.where(item_id: domain.registrant_id).where(event: :destroy).last
- registrant = ver.reify
- registrant.version_loader = ver
- registrant = [registrant]
- creator = pending_user.try(:username)
- event = 'pending'
- whodunnit = false
%td
%p.nowrap
= l(domain.updated_at, format: :shorts)
-#- if statuses_link
%br= link_to t(:edit_statuses), edit_admin_domain_path(params[:domain_id])
%p.text-right
- if (event == 'update' || event == 'create') && epp_req
= link_to event, '#', class: 'js-event'
- else
= event
%br
- if whodunnit
= whodunnit
- else
= creator
- if version
%p.text-right
= link_to "Pure history", admin_domain_version_path(version)
%td{class: changing_css_class(version,"statuses")}
%p
- if domain.statuses.present?
- domain.statuses.each do |s|
= s
- if domain.status_notes.present?
- notes = domain.status_notes[s]
- if notes
%br
%i= notes
%br
- if domain.pending_json.present?
%p
= link_to t(:pending_epp), '#', class: 'js-pending'
%td{class: changing_css_class(version, "period", "period_unit", "valid_from", "valid_to")}
%p
= "#{domain.period}#{domain.period_unit}"
%br
= "#{l(domain.valid_from, format: :date)}"
%br
= "#{l(domain.valid_to, format: :date)}"
%td
- Array(registrant).each do |r|
- link = r.version_loader ? admin_contact_version_path(r.version_loader.try(:id)) : admin_contact_path(r.id)
= link_to link, target: "contact_#{r.id}" do
%p
= r[:name]
= r[:phone]
= r[:email]
%p
= r[:code]
%td
- Array(admin_contacts).each do |ac|
- link = ac.version_loader ? admin_contact_version_path(ac.version_loader.try(:id)) : admin_contact_path(ac.id)
= link_to link, target: "contact_#{ac.id}" do
%p
= ac[:name]
= ac[:phone]
= ac[:email]
%p
= ac[:code]
%td
- Array(tech_contacts).each do |tc|
- link = tc.version_loader ? admin_contact_version_path(tc.version_loader.try(:id)) : admin_contact_path(tc.id)
= link_to link, target: "contact_#{tc.id}" do
%p
= tc[:name]
= tc[:phone]
= tc[:email]
%p
= tc[:code]
%td
%p
- Array(nameservers).each do |ns|
= ns[:hostname]
%br
= ns[:ipv4].presence
= ns[:ipv6].presence
%br
%td
- Array(dnskeys).each do |ns|
%p
= ns.flags
= ns.protocol
= ns.alg
- if ns.public_key.present?
\...#{ns.public_key.to_s[-20,20]}
%td{class: changing_css_class(version,"registrar_id")}
- if domain.registrar
%p
= link_to admin_registrar_path(domain.registrar), target: "registrar_#{domain.registrar.id}" do
= domain.registrar.name
- if (event == 'create' || event == 'update') && epp_req
%tr.js-event{ style: 'display: none;' }
%td{colspan: 9}
%pre
= Nokogiri::XML(epp_req)
- if domain.pending_json.present?
%tr.js-pending{ style: 'display: none;' }
%td{colspan: 9}
= preserve do
%pre
- formatted_req = Nokogiri::XML(domain.pending_json['frame'])
- if formatted_req.errors.none?
= formatted_req
- else
= domain.pending_json['frame']

View file

@ -4,8 +4,8 @@
.row .row
.col-md-12 .col-md-12
.table-responsive .table-responsive{data: {doublescroll: true}}
%table.table-hover.table-bordered.table-condensed %table.table.table-bordered.table-condensed
%thead %thead
%tr %tr
%th{class: 'col-xs-1'}= t(:timestap) %th{class: 'col-xs-1'}= t(:timestap)
@ -15,30 +15,31 @@
%th{class: 'col-xs-2'}= t(:admin) %th{class: 'col-xs-2'}= t(:admin)
%th{class: 'col-xs-2'}= t(:tech) %th{class: 'col-xs-2'}= t(:tech)
%th{class: 'col-xs-2'}= t(:nameservers) %th{class: 'col-xs-2'}= t(:nameservers)
%th{class: 'col-xs-2'}= t(:dnskeys)
%th{class: 'col-xs-2'}= t(:registrar) %th{class: 'col-xs-2'}= t(:registrar)
%tbody %tbody
- if @pending_domain.present? -#- if @pending_domain.present?
%tr.small %tr.small
= render 'admin/domain_versions/version', = render 'admin/domains/partials/version',
domain: @pending_domain, pending_user: @pending_user, statuses_link: true domain: @pending_domain, pending_user: @pending_user, statuses_link: true
-# current version -# current version
- if @domain.versions.present? - if @domain.versions.present?
%tr.small %tr.small
= render 'admin/domain_versions/version', = render 'admin/domains/partials/version',
domain: @domain, version: @domain.versions.last domain: @domain, version: @domain.versions.last
-# all other older versions -# all other older versions
- @domain.versions.not_creates.reverse.each do |version| - @domain.versions.not_creates.reverse.each do |version|
%tr.small %tr.small
= render 'admin/domain_versions/version', = render 'admin/domains/partials/version',
domain: version.reify, version: version.previous domain: version.reify, version: version.previous
:coffee :coffee
$(document).on 'click', '.js-pending-toggle', (e) -> $(document).on 'click', '.js-pending, .js-event', (e) ->
e.preventDefault() e.preventDefault()
$(document).on 'mousedown', '.js-pending-toggle', (e) -> $(document).on 'mousedown', '.js-pending, .js-event', (e) ->
target = $(e.target) target = $(e.target)
target.parents('tr').next('tr.js-pending').toggle() target.parents('tr').nextUntil('tr.small' ,'tr.' + this.className).toggle()

View file

@ -11,8 +11,10 @@
= f.select :request_command_eq, [[t(:choose),''], 'hello', 'login', 'logout', 'info', 'create', 'update', 'delete', 'check', 'renew', 'transfer', 'poll', 'keyrelay'], {}, class: 'form-control selectize', placeholder: t(:choose) = f.select :request_command_eq, [[t(:choose),''], 'hello', 'login', 'logout', 'info', 'create', 'update', 'delete', 'check', 'renew', 'transfer', 'poll', 'keyrelay'], {}, class: 'form-control selectize', placeholder: t(:choose)
.col-md-3 .col-md-3
.form-group .form-group
- opts = [[t(:choose),''], 'contact', 'domain', 'poll', 'keyrelay']
- opts += [params[:q][:request_object_cont]] if params[:q].present? && params[:q][:request_object_cont].present?
= f.label :request_object = f.label :request_object
= f.select :request_object_eq, [[t(:choose),''], 'contact', 'domain', 'poll', 'keyrelay'], {}, class: 'form-control selectize', placeholder: t(:choose) = f.select :request_object_cont, opts, {}, class: 'form-control selectize_create', placeholder: t(:choose)
.col-md-3 .col-md-3
.form-group .form-group
= f.label :request_successful = f.label :request_successful

View file

@ -15,6 +15,7 @@
= render 'setting_row', var: :admin_contacts_max_count = render 'setting_row', var: :admin_contacts_max_count
= render 'setting_row', var: :tech_contacts_min_count = render 'setting_row', var: :tech_contacts_min_count
= render 'setting_row', var: :tech_contacts_max_count = render 'setting_row', var: :tech_contacts_max_count
= render 'setting_row', var: :orphans_contacts_in_months
= render 'setting_row', var: :ds_data_allowed = render 'setting_row', var: :ds_data_allowed
= render 'setting_row', var: :key_data_allowed = render 'setting_row', var: :key_data_allowed
= render 'setting_row', var: :dnskeys_min_count = render 'setting_row', var: :dnskeys_min_count

View file

@ -3,9 +3,26 @@ xml.epp_head do
@errors.each do |x| @errors.each do |x|
xml.result('code' => x[:code]) do xml.result('code' => x[:code]) do
xml.msg(x[:msg], 'lang' => 'en') xml.msg(x[:msg], 'lang' => 'en')
model_name = resource ? resource.model_name.singular.sub('epp_','') : controller.controller_name.singularize
xml.value('xmlns:obj' => 'urn:ietf:params:xml:ns:obj') do xml.value("xmlns:#{model_name}" => "https://epp.tld.ee/schema/#{model_name}-eis-1.0.xsd") do
xml.tag!("obj:#{x[:value][:obj]}", x[:value][:val]) value = x[:value][:val]
attrs = {}
attrs["s"] = value if x[:value][:obj] == "status"
if (val = value).respond_to?(:each)
val.each do |el|
if el.kind_of?(Array)
xml.tag!("#{model_name}:#{x[:value][:obj]}") do
xml.tag!("#{model_name}:#{el[0]}", el[1], attrs)
end
else
xml.tag!("#{model_name}:#{x[:value][:obj]}", el, attrs)
end
end
else
xml.tag!("#{model_name}:#{x[:value][:obj]}", val, attrs)
end
end if x[:value] end if x[:value]
x[:ext_values].each do |y| x[:ext_values].each do |y|

View file

@ -9,15 +9,11 @@ xml.epp_head do
xml.msg @message.body xml.msg @message.body
end end
xml.resData do if @message.attached_obj_type == 'DomainTransfer'
case @message.attached_obj_type xml.resData do
when 'DomainTransfer' xml << render('epp/domains/partials/transfer', builder: xml, dt: @object)
xml << render('epp/domains/partials/transfer', builder: xml, dt: @object) end if @object
when 'DomainVersion' end
xml << render('epp/domains/partials/delete_complete', builder: xml, bye_bye: @object)
end
end if @object
render('epp/shared/trID', builder: xml) render('epp/shared/trID', builder: xml)
end end
end end

View file

@ -0,0 +1,11 @@
-# Link to the "First" page
-# available local variables
-# url: url to the first page
-# current_page: a page object for the currently displayed page
-# total_pages: total number of pages
-# per_page: number of items to fetch per page
-# remote: data-remote
%span.first
- param_name = current_page.instance_variable_get("@options")[:param_name] || Kaminari.config.param_name
- urlik = url_for( params.merge(param_name => 1, :only_path => true))
= link_to_unless current_page.first?, t('views.pagination.first').html_safe, urlik, :remote => remote

View file

@ -0,0 +1,8 @@
-# Non-link tag that stands for skipped pages...
-# available local variables
-# current_page: a page object for the currently displayed page
-# total_pages: total number of pages
-# per_page: number of items to fetch per page
-# remote: data-remote
%span.page.gap
= t('views.pagination.truncate').html_safe

View file

@ -0,0 +1,9 @@
-# Link to the "Last" page
-# available local variables
-# url: url to the last page
-# current_page: a page object for the currently displayed page
-# total_pages: total number of pages
-# per_page: number of items to fetch per page
-# remote: data-remote
%span.last
= link_to_unless current_page.last?, t('views.pagination.last').html_safe, url, :remote => remote

View file

@ -0,0 +1,9 @@
-# Link to the "Next" page
-# available local variables
-# url: url to the next page
-# current_page: a page object for the currently displayed page
-# total_pages: total number of pages
-# per_page: number of items to fetch per page
-# remote: data-remote
%span.next
= link_to_unless current_page.last?, t('views.pagination.next').html_safe, url, :rel => 'next', :remote => remote

View file

@ -0,0 +1,12 @@
-# Link showing page number
-# available local variables
-# page: a page object for "this" page
-# url: url to this page
-# current_page: a page object for the currently displayed page
-# total_pages: total number of pages
-# per_page: number of items to fetch per page
-# remote: data-remote
%span{:class => "page#{' current' if page.current?}"}
- param_name = current_page.instance_variable_get("@options")[:param_name] || Kaminari.config.param_name
- urlik = url_for( params.merge(param_name => page.to_i, :only_path => true))
= link_to_unless page.current?, page, urlik, {:remote => remote, :rel => page.next? ? 'next' : page.prev? ? 'prev' : nil}

View file

@ -0,0 +1,18 @@
-# The container tag
-# available local variables
-# current_page: a page object for the currently displayed page
-# total_pages: total number of pages
-# per_page: number of items to fetch per page
-# remote: data-remote
-# paginator: the paginator that renders the pagination tags inside
= paginator.render do
%nav.pagination
= first_page_tag unless current_page.first?
= prev_page_tag unless current_page.first?
- each_page do |page|
- if page.left_outer? || page.right_outer? || page.inside_window?
= page_tag page
- elsif !page.was_truncated?
= gap_tag
= next_page_tag unless current_page.last?
= last_page_tag unless current_page.last?

View file

@ -0,0 +1,11 @@
-# Link to the "Previous" page
-# available local variables
-# url: url to the previous page
-# current_page: a page object for the currently displayed page
-# total_pages: total number of pages
-# per_page: number of items to fetch per page
-# remote: data-remote
%span.prev
- param_name = current_page.instance_variable_get("@options")[:param_name] || Kaminari.config.param_name
- urlik = url_for( params.merge(param_name => current_page.to_i - 1, :only_path => true))
= link_to_unless current_page.first?, t('views.pagination.previous').html_safe, urlik, :rel => 'prev', :remote => remote

View file

@ -57,6 +57,10 @@
%li= link_to t(:invoices), admin_invoices_path %li= link_to t(:invoices), admin_invoices_path
%li= link_to t(:account_activities), admin_account_activities_path(created_after: 'today') %li= link_to t(:account_activities), admin_account_activities_path(created_after: 'today')
%li.divider %li.divider
%li.dropdown-header= t(:archive)
%li= link_to t(:domains_history), admin_domain_versions_path
%li= link_to t(:contacts_history), admin_contact_versions_path
%li.divider
%li.dropdown-header= t(:system) %li.dropdown-header= t(:system)
%li= link_to t(:settings), admin_settings_path %li= link_to t(:settings), admin_settings_path
%li= link_to t(:zonefile), admin_zonefile_settings_path %li= link_to t(:zonefile), admin_zonefile_settings_path

View file

@ -1,10 +1,10 @@
Tere <%= @contact.name %> Tere <%= @contact.name %>
<br><br> <br><br>
Kontakti <%= @contact.name %> eposti aadress on muudetud<br> Kontakti <%= @contact.name %> e-posti aadress on muudetud<br>
endine aadress: <%= @old_email %><br> endine aadress: <%= @old_email %><br>
uus aadress: <%= @contact.email %> uus aadress: <%= @contact.email %>
<br><br> <br><br>
Eposti aadressile saadetakse domeenidega seotud infot seal hulgas kinnitustaotluseid omaniku vahetuse ja domeeni kustutamise korral. Palun veenduge, et muudatus on korrektne ning probleemide korral pöörduga oma registripidaja poole. Teie registripidaja on <%= @contact.registrar.name %> E-posti aadressile saadetakse domeeni toimingutega seotud infot, sealhulgas kinnitustaotlused omanikuvahetuse ja domeeni kustutamise korral. Palun veenduge, et muudatus on korrektne ning probleemide korral pöörduge oma registripidaja <%= @contact.registrar.name %> poole.
<br><br> <br><br>
<% if @contact.related_domain_descriptions.present? %> <% if @contact.related_domain_descriptions.present? %>
Muudatusega seotud domeenid:<br> Muudatusega seotud domeenid:<br>
@ -16,14 +16,14 @@ Muudatusega seotud domeenid:<br>
Kontaktandmed:<br> Kontaktandmed:<br>
Nimi: <%= @contact.name %><br> Nimi: <%= @contact.name %><br>
Isikukood: <%= @contact.ident %><br> Isikukood: <%= @contact.ident %><br>
Epost: <%= @contact.email %><br> E-post: <%= @contact.email %><br>
Tel: <%= @contact.phone %><br> Tel: <%= @contact.phone %><br>
Tänav: <%= @contact.street %><br> Tänav: <%= @contact.street %><br>
Linn: <%= @contact.city %><br> Linn: <%= @contact.city %><br>
Riik: <%= @contact.country %> Riik: <%= @contact.country %>
<br><br> <br><br>
Lugupidamisega<br> Lugupidamisega<br>
Eesti Interneti SA Eesti Interneti Sihtasutus
<br><br> <br><br>
<hr> <hr>
<br><br> <br><br>
@ -52,4 +52,4 @@ City: <%= @contact.city %><br>
Country: <%= @contact.country %> Country: <%= @contact.country %>
<br><br> <br><br>
Best Regards,<br> Best Regards,<br>
Eesti Interneti SA Estonian Internet Foundation

View file

@ -1,10 +1,10 @@
Tere <%= @contact.name %> Tere <%= @contact.name %>
Kontakti <%= @contact.name %> eposti aadress on muudetud Kontakti <%= @contact.name %> e-posti aadress on muudetud
endine aadress: <%= @old_email %> endine aadress: <%= @old_email %>
uus aadress: <%= @contact.email %> uus aadress: <%= @contact.email %>
Eposti aadressile saadetakse domeenidega seotud infot seal hulgas kinnitustaotluseid omaniku vahetuse ja domeeni kustutamise korral. Palun veenduge, et muudatus on korrektne ning probleemide korral pöörduga oma registripidaja poole. Teie registripidaja on <%= @contact.registrar.name %> E-posti aadressile saadetakse domeeni toimingutega seotud infot, sealhulgas kinnitustaotlused omanikuvahetuse ja domeeni kustutamise korral. Palun veenduge, et muudatus on korrektne ning probleemide korral pöörduge oma registripidaja <%= @contact.registrar.name %> poole.
<% if @contact.related_domain_descriptions.present? %> <% if @contact.related_domain_descriptions.present? %>
Muudatusega seotud domeenid: Muudatusega seotud domeenid:
@ -16,14 +16,14 @@ Muudatusega seotud domeenid:
Kontaktandmed: Kontaktandmed:
Nimi: <%= @contact.name %> Nimi: <%= @contact.name %>
Isikukood: <%= @contact.ident %> Isikukood: <%= @contact.ident %>
Epost: <%= @contact.email %> E-post: <%= @contact.email %>
Tel: <%= @contact.phone %> Tel: <%= @contact.phone %>
Tänav: <%= @contact.street %> Tänav: <%= @contact.street %>
Linn: <%= @contact.city %> Linn: <%= @contact.city %>
Riik: <%= @contact.country %> Riik: <%= @contact.country %>
Lugupidamisega Lugupidamisega
Eesti Interneti SA Eesti Interneti Sihtasutus
---------------------------------------------------------------------------------- ----------------------------------------------------------------------------------
@ -52,4 +52,4 @@ City: <%= @contact.city %>
Country: <%= @contact.country %> Country: <%= @contact.country %>
Best Regards, Best Regards,
Eesti Interneti SA Estonian Internet Foundation

View file

@ -1,15 +1,15 @@
Tere, Tere
<br><br> <br><br>
Domeeni <%= @domain.name %> kustutamise taotlus on registreerija poolt kinnitatud. Domeen <%= @domain.name %> on peatatud ja kustub registrist. Domeeni <%= @domain.name %> kustutamise taotlus on registreerija poolt kinnitatud. Domeen <%= @domain.name %> on peatatud ja kustub registrist.
<br><br> <br><br>
Lugupidamisega<br> Lugupidamisega<br>
Eesti Interneti SA Eesti Interneti Sihtasutus
<br><br> <br><br>
<hr> <hr>
<br><br> <br><br>
Hi, Hi,
<br><br> <br><br>
Domain <%= @domain.name %> deletion confirmed and will be deleted. Domain <%= @domain.name %> deletion is confirmed by the registrant. Domain <%= @domain.name %> is suspended and will be deleted.
<br><br> <br><br>
Best Regards,<br> Best Regards,<br>
Estonian Internet Foundation Estonian Internet Foundation

View file

@ -1,15 +1,15 @@
Tere, Tere
Domeeni <%= @domain.name %> kustutamise taotlus on registreerija poolt kinnitatud. Domeen <%= @domain.name %> on peatatud ja kustub registrist. Domeeni <%= @domain.name %> kustutamise taotlus on registreerija poolt kinnitatud. Domeen <%= @domain.name %> on peatatud ja kustub registrist.
Lugupidamisega Lugupidamisega
Eesti Interneti SA Eesti Interneti Sihtasutus
-------------------------------------- --------------------------------------
Hi, Hi,
Domain <%= @domain.name %> deletion confirmed and will be deleted. Domain <%= @domain.name %> deletion is confirmed by the registrant. Domain <%= @domain.name %> is suspended and will be deleted.
Best Regards, Best Regards,
Estonian Internet Foundation Estonian Internet Foundation

View file

@ -14,13 +14,8 @@ Registripidaja: <%= @domain.registrar.name %><br>
Nimeserverid: <%= @domain.nameservers.join(', ') %><br> Nimeserverid: <%= @domain.nameservers.join(', ') %><br>
Ülevaate kõikidest endaga seotud domeenidest saate registreerija portaalist. <%= ENV['registrant_url'] %>.<br> Ülevaate kõikidest endaga seotud domeenidest saate registreerija portaalist. <%= ENV['registrant_url'] %>.<br>
<br><br> <br><br>
Parimate soovidega Lugupidamisega<br>
<br><br> Eesti Interneti Sihtasutus
Eesti Interneti Sihtasutus<br>
Paldiski mnt 80, 10617 Tallinn<br>
Registrikood: 90010019<br>
E-post: info@internet.ee<br>
Tel: +372 727 1000<br>
<br><br> <br><br>
<hr> <hr>
<br><br> <br><br>
@ -29,7 +24,7 @@ Dear user of .ee domain,<br>
<br> <br>
The domain name <%= @domain.name %> has expired and will not be available on the Internet from <%= l(@domain.outzone_at, format: :date) %>. From <%= l(@domain.delete_at, format: :date) %>, the <%= @domain.name %> domain will be available for registration on a first come first served basis. The domain name <%= @domain.name %> has expired and will not be available on the Internet from <%= l(@domain.outzone_at, format: :date) %>. From <%= l(@domain.delete_at, format: :date) %>, the <%= @domain.name %> domain will be available for registration on a first come first served basis.
<br><br> <br><br>
To renew the domain registration, please contact your registrar <%= @domain.registrar.name %>. You can find the registrar's contacts at http://www.internet.ee/en/registripidajad/. To renew the domain registration, please contact your registrar <%= @domain.registrar.name %>. You can find the registrar's contacts at http://internet.ee/registrars.
<br><br> <br><br>
The following data for the <%= @domain.name %> domain have been entered into the registry: The following data for the <%= @domain.name %> domain have been entered into the registry:
<br><br> <br><br>
@ -40,13 +35,8 @@ Registrar: <%= @domain.registrar.name %><br>
Name servers: <%= @domain.nameservers.join(', ') %><br> Name servers: <%= @domain.nameservers.join(', ') %><br>
You can find an overview of all your domains at the registrant's portal. <%= ENV['registrant_url'] %>.<br> You can find an overview of all your domains at the registrant's portal. <%= ENV['registrant_url'] %>.<br>
<br><br> <br><br>
Sincerely Best Regards,<br>
<br><br> Estonian Internet Foundation
Estonian Internet Foundation<br>
Paldiski mnt 80, 10617 Tallinn<br>
Business Registry no: 90010019<br>
E-mail: info@internet.ee<br>
Phone: +372 727 1000<br>
<br><br> <br><br>
<hr> <hr>
<br><br> <br><br>
@ -55,7 +45,7 @@ Phone: +372 727 1000<br>
<br> <br>
Доменное имя <%= @domain.name %> устарело и с <%= l(@domain.outzone_at, format: :date) %> недоступно в Интернете. С <%= l(@domain.delete_at, format: :date) %> домен <%= @domain.name %> доступен для регистрации всем желающим по принципу "first come, first served". Доменное имя <%= @domain.name %> устарело и с <%= l(@domain.outzone_at, format: :date) %> недоступно в Интернете. С <%= l(@domain.delete_at, format: :date) %> домен <%= @domain.name %> доступен для регистрации всем желающим по принципу "first come, first served".
<br><br> <br><br>
Для продления регистрации домена просим обратиться к своему регистратору <%= @domain.registrar.name %>. Контактные данные регистраторов можно найти по адресу http://www.internet.ee/ru/p/. Для продления регистрации домена просим обратиться к своему регистратору <%= @domain.registrar.name %>. Контактные данные регистраторов можно найти по адресу http://internet.ee/registratory.
<br><br> <br><br>
Относительно домена <%= @domain.name %> в реестр внесены следующие данные: Относительно домена <%= @domain.name %> в реестр внесены следующие данные:
<br><br> <br><br>
@ -66,10 +56,5 @@ Phone: +372 727 1000<br>
Серверы доменных имен: <%= @domain.nameservers.join(', ') %><br> Серверы доменных имен: <%= @domain.nameservers.join(', ') %><br>
Обзор всех связанных с Вами доменов можете получить на портале регистранта. <%= ENV['registrant_url'] %>.<br> Обзор всех связанных с Вами доменов можете получить на портале регистранта. <%= ENV['registrant_url'] %>.<br>
<br><br> <br><br>
С наилучшими пожеланиями С наилучшими пожеланиями<br>
<br><br> Целевое учреждение Eesti Internet
Целевое учреждение Eesti Internet<br>
Paldiski mnt 80, 10617 Tallinn<br>
Регистрационный код: 90010019<br>
Э-почта: info@internet.ee<br>
Тел.: +372 727 1000<br>

View file

@ -15,12 +15,7 @@ Nimeserverid: <%= @domain.nameservers.join(', ') %>
Ülevaate kõikidest endaga seotud domeenidest saate registreerija portaalist. <%= ENV['registrant_url'] %>. Ülevaate kõikidest endaga seotud domeenidest saate registreerija portaalist. <%= ENV['registrant_url'] %>.
Parimate soovidega Parimate soovidega
Eesti Interneti Sihtasutus Eesti Interneti Sihtasutus
Paldiski mnt 80, 10617 Tallinn
Registrikood: 90010019
E-post: info@internet.ee
Tel: +372 727 1000
-------------------------------------- --------------------------------------
@ -29,7 +24,7 @@ Dear user of .ee domain,
The domain name <%= @domain.name %> has expired and will not be available on the Internet from <%= l(@domain.outzone_at, format: :date) %>. From <%= l(@domain.delete_at, format: :date) %>, the <%= @domain.name %> domain will be available for registration on a first come first served basis. The domain name <%= @domain.name %> has expired and will not be available on the Internet from <%= l(@domain.outzone_at, format: :date) %>. From <%= l(@domain.delete_at, format: :date) %>, the <%= @domain.name %> domain will be available for registration on a first come first served basis.
To renew the domain registration, please contact your registrar <%= @domain.registrar.name %>. You can find the registrar's contacts at http://www.internet.ee/en/registripidajad/. To renew the domain registration, please contact your registrar <%= @domain.registrar.name %>. You can find the registrar's contacts at http://internet.ee/registrars.
The following data for the <%= @domain.name %> domain have been entered into the registry: The following data for the <%= @domain.name %> domain have been entered into the registry:
@ -40,13 +35,8 @@ Registrar: <%= @domain.registrar.name %>
Name servers: <%= @domain.nameservers.join(', ') %> Name servers: <%= @domain.nameservers.join(', ') %>
You can find an overview of all your domains at the registrant's portal. <%= ENV['registrant_url'] %>. You can find an overview of all your domains at the registrant's portal. <%= ENV['registrant_url'] %>.
Sincerely Best Regards,
Estonian Internet Foundation Estonian Internet Foundation
Paldiski mnt 80, 10617 Tallinn
Business Registry no: 90010019
E-mail: info@internet.ee
Phone: +372 727 1000
-------------------------------------- --------------------------------------
@ -55,7 +45,7 @@ Phone: +372 727 1000
Доменное имя <%= @domain.name %> устарело и с <%= l(@domain.outzone_at, format: :date) %> недоступно в Интернете. С <%= l(@domain.delete_at, format: :date) %> домен <%= @domain.name %> доступен для регистрации всем желающим по принципу "first come, first served". Доменное имя <%= @domain.name %> устарело и с <%= l(@domain.outzone_at, format: :date) %> недоступно в Интернете. С <%= l(@domain.delete_at, format: :date) %> домен <%= @domain.name %> доступен для регистрации всем желающим по принципу "first come, first served".
Для продления регистрации домена просим обратиться к своему регистратору <%= @domain.registrar.name %>. Контактные данные регистраторов можно найти по адресу http://www.internet.ee/ru/p/. Для продления регистрации домена просим обратиться к своему регистратору <%= @domain.registrar.name %>. Контактные данные регистраторов можно найти по адресу http://internet.ee/registratory.
Относительно домена <%= @domain.name %> в реестр внесены следующие данные: Относительно домена <%= @domain.name %> в реестр внесены следующие данные:
@ -67,9 +57,4 @@ Phone: +372 727 1000
Обзор всех связанных с Вами доменов можете получить на портале регистранта. <%= ENV['registrant_url'] %>. Обзор всех связанных с Вами доменов можете получить на портале регистранта. <%= ENV['registrant_url'] %>.
С наилучшими пожеланиями С наилучшими пожеланиями
Целевое учреждение Eesti Internet Целевое учреждение Eesti Internet
Paldiski mnt 80, 10617 Tallinn
Регистрационный код: 90010019
Э-почта: info@internet.ee
Тел.: +372 727 1000

View file

@ -9,33 +9,33 @@
<strong>Lugupeetud domeeni <%= @domain.name %> kontaktisik</strong> <strong>Lugupeetud domeeni <%= @domain.name %> kontaktisik</strong>
<p>Eesti Interneti SA (EIS) domeeniregistrisse on domeeni <b><%= @domain.name %></b> kohta kantud j&auml;rgmised andmed:</p> <p>.ee domeeniregistrisse on domeeni <b><%= @domain.name %></b> kohta kantud j&auml;rgmised andmed:</p>
<p>Registreerija nimi: <b><%= @domain.registrant %></b><br /> <p>Registreerija nimi: <b><%= @domain.registrant %></b><br />
Registrikood: <b><%= @domain.registrant.try(:ident) %></b></p> Registrikood: <b><%= @domain.registrant.try(:ident) %></b></p>
<p>EIS-le on saanud teatavaks, et juriidiline isik registrikoodiga <b><%= @domain.registrant.try(:ident) %></b> on &auml;riregistrist kustutatud.</p> <p>Eesti Interneti Sihtasutusele (EIS) on saanud teatavaks, et juriidiline isik registrikoodiga <b><%= @domain.registrant.try(:ident) %></b> on &auml;riregistrist kustutatud.</p>
<p>Kuiv&otilde;rd &auml;riregistrist kustutatud juriidiline isik ei saa olla domeeni registreerijaks, siis algatas EIS <b><%= l(Time.zone.now, format: :date) %></b> vastavalt Domeenireeglite (<a href="http://www.internet.ee/domeenid/" target="_blank">http://www.internet.ee/domeenid/</a>) punktile 6.4 domeeni <b><%= @domain.name %></b> suhtes 30 p&auml;eva pikkuse kustutusmenetluse. Kustutamise k&auml;igus j&auml;&auml;b domeen internetis k&auml;ttesaadavaks.</p> <p>Kuiv&otilde;rd &auml;riregistrist kustutatud juriidiline isik ei saa olla domeeni registreerijaks, siis algatas EIS <b><%= l(Time.zone.now, format: :date) %></b> vastavalt Domeenireeglite (<a href="http://www.internet.ee/domeenid/" target="_blank">http://www.internet.ee/domeenid/</a>) punktile 6.4 domeeni <b><%= @domain.name %></b> suhtes 30 p&auml;eva pikkuse kustutusmenetluse. Kustutamise k&auml;igus j&auml;&auml;b domeen internetis k&auml;ttesaadavaks.</p>
<p>Domeenireeglite punktist 6.4 tulenevalt on domeeni suhtes &otilde;igust omaval registreerijal v&otilde;imalus esitada domeeni <b><%= @domain.name %></b> registripidajale <b><%= @domain.registrar %></b> domeeni &uuml;leandmise taotlus Domeenireeglite p 5.3.6.2 kohaselt. Taotlusele tuleb lisada domeeni omandamist t&otilde;endavad dokumendid, mis asendavad Domeenireeglite punktis 5.3.6.3 s&auml;testatud &uuml;leandva registreerija n&otilde;usolekut. Vastav dokumentatsioon tuleks esitada Registripidajale esimesel v&otilde;imalusel.</p> <p>Domeenireeglite punktist 6.4 tulenevalt on domeeni suhtes &otilde;igust omaval registreerijal v&otilde;imalus esitada domeeni <b><%= @domain.name %></b> registripidajale <b><%= @domain.registrar %></b> domeeni &uuml;leandmise taotlus Domeenireeglite p 5.3.6.2 kohaselt. Taotlusele tuleb lisada domeeni omandamist t&otilde;endavad dokumendid, mis asendavad Domeenireeglite punktis 5.3.6.3 s&auml;testatud &uuml;leandva registreerija n&otilde;usolekut. Vastav dokumentatsioon tuleb esitada Registripidajale esimesel v&otilde;imalusel.</p>
<p>Kui &uuml;leandmine ei ole 30 p&auml;eva jooksul toimunud, kustub domeen <b><%= @domain.name %></b> 24 tunni jooksul <b><%= l(@domain.force_delete_at, format: :date) %></b> m&ouml;&ouml;dumisest juhuslikult valitud ajahetkel. Soovi korral on v&otilde;imalik domeen p&auml;rast selle kustumist registrist “kes ees, see mees” p&otilde;him&otilde;ttel uuesti registreerida.</p> <p>Kui &uuml;leandmine ei ole 30 p&auml;eva jooksul toimunud, kustub domeen <b><%= @domain.name %></b> 24 tunni jooksul <b><%= l(@domain.force_delete_at, format: :date) %></b> m&ouml;&ouml;dumisest juhuslikult valitud ajahetkel. Soovi korral on v&otilde;imalik domeen p&auml;rast selle kustumist registrist “kes ees, see mees” p&otilde;him&otilde;ttel uuesti registreerida.</p>
<p>Lisak&uuml;simuste korral v&otilde;tke palun &uuml;hendust oma registripidajaga <%= @domain.registrar %>, kelle kontaktandmed leiate lingilt <a href="http://www.internet.ee/registripidajad" target="_blank">http://www.internet.ee/registripidajad</a></p><br /><br /> <p>Lisak&uuml;simuste korral v&otilde;tke palun &uuml;hendust oma registripidajaga <%= @domain.registrar %>. Registripidajate kontaktid leiate aadressilt <a href="http://www.internet.ee/registripidajad" target="_blank">http://www.internet.ee/registripidajad</a></p><br /><br />
<strong>Dear contact of <%= @domain.name %> domain</strong> <strong>Dear contact of <%= @domain.name %> domain</strong>
<p>The following details for domain name <b><%= @domain.name %></b> have been entered into the Estonian Internet Foundation's (EIF) domain registry:</p> <p>The following details for domain name <b><%= @domain.name %></b> have been entered into the .ee domain registry:</p>
<p>Registrant's name: <b><%= @domain.registrant %></b><br /> <p>Registrant's name: <b><%= @domain.registrant %></b><br />
Registry code: <b><%= @domain.registrant.try(:ident) %></b></p> Registry code: <b><%= @domain.registrant.try(:ident) %></b></p>
<p>EIF has learned that the legal person with registry code <b><%= @domain.registrant.try(:ident) %></b> has been deleted from the Business Registry.</p> <p>Estonian Internet Foundation (EIS) has learned that the legal person with registry code <b><%= @domain.registrant.try(:ident) %></b> has been deleted from the Business Registry.</p>
<p>As a terminated legal person cannot be the registrant of a domain, the EIF started the deletion process of <b><%= @domain.name %></b> domain on <b><%= l(Time.zone.now, format: :date) %></b> according to the Domain Regulation (<a href="http://www.internet.ee/domains/" target="_blank">http://www.internet.ee/domains/</a>), using the 30-day delete procedure. The domain will remain available on the Internet during the delete procedure.</p> <p>As a terminated legal person cannot be the registrant of a domain, the EIS started the deletion process of <b><%= @domain.name %></b> domain on <b><%= l(Time.zone.now, format: :date) %></b> according to the Domain Regulation (<a href="http://www.internet.ee/domains/" target="_blank">http://www.internet.ee/domains/</a>), using the 30-day delete procedure. The domain will remain available on the Internet during the delete procedure.</p>
<p>According to paragraph 6.4 of the Domain Regulation, the registrant holding a right to the domain name <b><%= @domain.name %></b> can submit a domain name transfer application to the registrar <b><%= @domain.registrar %></b> in accordance with paragraph 5.3.6.2 of the Domain Regulation. The application must be submitted together with documents certifying the acquisition of the domain that will replace the consent of the surrendering registrant as laid down in paragraph 5.3.6.3 of the Domain Regulation. The relevant documents should be submitted to the registrar as soon as possible.</p> <p>According to paragraph 6.4 of the Domain Regulation, the registrant holding a right to the domain name <b><%= @domain.name %></b> can submit a domain name transfer application to the registrar <b><%= @domain.registrar %></b> in accordance with paragraph 5.3.6.2 of the Domain Regulation. The application must be submitted together with documents certifying the acquisition of the domain that will replace the consent of the surrendering registrant as laid down in paragraph 5.3.6.3 of the Domain Regulation. The relevant documents should be submitted to the registrar as soon as possible.</p>
@ -65,9 +65,9 @@ Registry code: <b><%= @domain.registrant.try(:ident) %></b></p>
<table width="100%" cellspacing="0" cellpadding="0" border="0" align="center" style="text-align: justify; line-height: 16px; font-size: 12px;"><tbody> <table width="100%" cellspacing="0" cellpadding="0" border="0" align="center" style="text-align: justify; line-height: 16px; font-size: 12px;"><tbody>
<tr><td align="left" valign="top"> <tr><td align="left" valign="top">
<p><strong>Lugupidamisega,<br /> <p><strong>Lugupidamisega,<br />
Yours Sincerely,<br /> Best Regards,<br />
С уважением,</strong></p> С уважением,</strong></p>
<p><i>Eesti Interneti SA<br /> <p><i>Eesti Interneti Sihtasutus<br />
Estonian Internet Foundation</i></p> Estonian Internet Foundation</i></p>
</td><td></td></tr> </td><td></td></tr>
</tbody> </tbody>

View file

@ -1,32 +1,32 @@
Lugupeetud domeeni <%= @domain.name %> kontaktisik Lugupeetud domeeni <%= @domain.name %> kontaktisik
Eesti Interneti SA (EIS) domeeniregistrisse on domeeni <%= @domain.name %> kohta kantud järgmised andmed: .ee domeeniregistrisse on domeeni <%= @domain.name %> kohta kantud järgmised andmed:
Registreerija nimi: <%= @domain.registrant %> Registreerija nimi: <%= @domain.registrant %>
Registrikood: <%= @domain.registrant.try(:ident) %> Registrikood: <%= @domain.registrant.try(:ident) %>
EIS-le on saanud teatavaks, et juriidiline isik registrikoodiga <%= @domain.registrant.try(:ident) %> on äriregistrist kustutatud. Eesti Interneti Sihtasutusele (EIS) on saanud teatavaks, et juriidiline isik registrikoodiga <%= @domain.registrant.try(:ident) %> on äriregistrist kustutatud.
Kuivõrd äriregistrist kustutatud juriidiline isik ei saa olla domeeni registreerijaks, siis algatas EIS <%= l(Time.zone.now, format: :date) %> vastavalt Domeenireeglite (http://www.internet.ee/domeenid/) punktile 6.4 domeeni <%= @domain.name %> suhtes 30 päeva pikkuse kustutusmenetluse. Kustutamise käigus jääb domeen internetis kättesaadavaks. Kuivõrd äriregistrist kustutatud juriidiline isik ei saa olla domeeni registreerijaks, siis algatas EIS <%= l(Time.zone.now, format: :date) %> vastavalt Domeenireeglite (http://www.internet.ee/domeenid/) punktile 6.4 domeeni <%= @domain.name %> suhtes 30 päeva pikkuse kustutusmenetluse. Kustutamise käigus jääb domeen internetis kättesaadavaks.
Domeenireeglite punktist 6.4 tulenevalt on domeeni suhtes õigust omaval registreerijal võimalus esitada domeeni <%= @domain.name %> registripidajale <%= @domain.registrar %> domeeni üleandmise taotlus Domeenireeglite p 5.3.6.2 kohaselt. Taotlusele tuleb lisada domeeni omandamist tõendavad dokumendid, mis asendavad Domeenireeglite punktis 5.3.6.3 sätestatud üleandva registreerija nõusolekut. Vastav dokumentatsioon tuleks esitada Registripidajale esimesel võimalusel. Domeenireeglite punktist 6.4 tulenevalt on domeeni suhtes õigust omaval registreerijal võimalus esitada domeeni <%= @domain.name %> registripidajale <%= @domain.registrar %> domeeni üleandmise taotlus Domeenireeglite p 5.3.6.2 kohaselt. Taotlusele tuleb lisada domeeni omandamist tõendavad dokumendid, mis asendavad Domeenireeglite punktis 5.3.6.3 sätestatud üleandva registreerija nõusolekut. Vastav dokumentatsioon tuleb esitada Registripidajale esimesel võimalusel.
Kui üleandmine ei ole 30 päeva jooksul toimunud, kustub domeen <%= @domain.name %> 24 tunni jooksul <%= l(@domain.force_delete_at, format: :date) %> möödumisest juhuslikult valitud ajahetkel. Soovi korral on võimalik domeen pärast selle kustumist registrist "kes ees, see mees" põhimõttel uuesti registreerida. Kui üleandmine ei ole 30 päeva jooksul toimunud, kustub domeen <%= @domain.name %> 24 tunni jooksul <%= l(@domain.force_delete_at, format: :date) %> möödumisest juhuslikult valitud ajahetkel. Soovi korral on võimalik domeen pärast selle kustumist registrist "kes ees, see mees" põhimõttel uuesti registreerida.
Lisaküsimuste korral võtke palun ühendust oma registripidajaga <%= @domain.registrar %>, kelle kontaktandmed leiate lingilt http://www.internet.ee/registripidajad/ Lisaküsimuste korral võtke palun ühendust oma registripidajaga <%= @domain.registrar %>. Registripidajate kontaktid leiate aadressilt http://www.internet.ee/registripidajad/
Dear contact of <%= @domain.name %> domain Dear contact of <%= @domain.name %> domain
The following details for domain name <%= @domain.name %> have been entered into the Estonian Internet Foundation's (EIF) domain registry: The following details for domain name <%= @domain.name %> have been entered into the .ee domain registry:
Registrant's name: <%= @domain.registrant %> Registrant's name: <%= @domain.registrant %>
Registry code: <%= @domain.registrant.try(:ident) %> Registry code: <%= @domain.registrant.try(:ident) %>
EIF has learned that the legal person with registry code <%= @domain.registrant.try(:ident) %> has been deleted from the Business Registry. Estonian Internet Foundation (EIS) has learned that the legal person with registry code <%= @domain.registrant.try(:ident) %> has been deleted from the Business Registry.
As a terminated legal person cannot be the registrant of a domain, the EIF started the deletion process of <%= @domain.name %> domain on <%= l(Time.zone.now, format: :date) %> according to the Domain Regulation (http://www.internet.ee/domains/), using the 30-day delete procedure. The domain will remain available on the Internet during the delete procedure. As a terminated legal person cannot be the registrant of a domain, the EIS started the deletion process of <%= @domain.name %> domain on <%= l(Time.zone.now, format: :date) %> according to the Domain Regulation (http://www.internet.ee/domains/), using the 30-day delete procedure. The domain will remain available on the Internet during the delete procedure.
According to paragraph 6.4 of the Domain Regulation, the registrant holding a right to the domain name <%= @domain.name %> can submit a domain name transfer application to the registrar <%= @domain.registrar %> in accordance with paragraph 5.3.6.2 of the Domain Regulation. The application must be submitted together with documents certifying the acquisition of the domain that will replace the consent of the surrendering registrant as laid down in paragraph 5.3.6.3 of the Domain Regulation. The relevant documents should be submitted to the registrar as soon as possible. According to paragraph 6.4 of the Domain Regulation, the registrant holding a right to the domain name <%= @domain.name %> can submit a domain name transfer application to the registrar <%= @domain.registrar %> in accordance with paragraph 5.3.6.2 of the Domain Regulation. The application must be submitted together with documents certifying the acquisition of the domain that will replace the consent of the surrendering registrant as laid down in paragraph 5.3.6.3 of the Domain Regulation. The relevant documents should be submitted to the registrar as soon as possible.
@ -56,8 +56,8 @@ EIS стало известно, что юридическое лицо с ре
Lugupidamisega, Lugupidamisega,
Yours Sincerely, Best Regards,
С уважением, С уважением,
--- ---
Eesti Interneti SA Eesti Interneti Sihtasutus
Estonian Internet Foundation Estonian Internet Foundation

View file

@ -1,15 +1,15 @@
Tere, Tere
<br><br> <br><br>
Domeeni <%= @domain.name %> kustutamise taotlust ei kinnitatud tähtaegselt registreerija <%= @domain.registrant_name %> poolt. Domeeni <%= @domain.name %> kustutamine on sellest tulenevalt tühistatud. Domeeni <%= @domain.name %> kustutamise taotlust ei kinnitatud tähtaegselt registreerija <%= @domain.registrant_name %> poolt. Domeeni <%= @domain.name %> kustutamine on sellest tulenevalt tühistatud.
<br><br> <br><br>
Lugupidamisega<br> Lugupidamisega<br>
Eesti Interneti SA Eesti Interneti Sihtasutus
<br><br> <br><br>
<hr> <hr>
<br><br> <br><br>
Hi, Hi,
<br><br> <br><br>
Domain <%= @domain.name %> deletion cancelled. Domain <%= @domain.name %> deletion was not approved in time by the registrant <%= @domain.registrant_name %>. Thus the deletion of domain <%= @domain.name %> is cancelled.
<br><br> <br><br>
Best Regards,<br> Best Regards,<br>
Estonian Internet Foundation Estonian Internet Foundation

View file

@ -1,15 +1,15 @@
Tere, Tere
Domeeni <%= @domain.name %> kustutamise taotlust ei kinnitatud tähtaegselt registreerija <%= @domain.registrant_name %> poolt. Domeeni <%= @domain.name %> kustutamine on sellest tulenevalt tühistatud. Domeeni <%= @domain.name %> kustutamise taotlust ei kinnitatud tähtaegselt registreerija <%= @domain.registrant_name %> poolt. Domeeni <%= @domain.name %> kustutamine on sellest tulenevalt tühistatud.
Lugupidamisega Lugupidamisega
Eesti Interneti SA Eesti Interneti Sihtasutus
-------------------------------------- --------------------------------------
Hi, Hi,
Domain <%= @domain.name %> deletion cancelled. Domain <%= @domain.name %> deletion was not approved in time by the registrant <%= @domain.registrant_name %>. Thus the deletion of domain <%= @domain.name %> is cancelled.
Best Regards, Best Regards,
Estonian Internet Foundation Estonian Internet Foundation

View file

@ -1,15 +1,15 @@
Tere, Tere
<br><br> <br><br>
Domeeni <%= @domain.name %> kustutamise taotlus on registreerija <%= @domain.registrar_name %> poolt tagasi lükatud. Domeeni <%= @domain.name %> kustutamise taotlus on registreerija <%= @domain.registrant_name %> poolt tagasi lükatud.
<br><br> <br><br>
Lugupidamisega<br> Lugupidamisega<br>
Eesti Interneti SA Eesti Interneti Sihtasutus
<br><br> <br><br>
<hr> <hr>
<br><br> <br><br>
Hi, Hi,
<br><br> <br><br>
Domain <%= @domain.name %> deletion rejected. Domain <%= @domain.name %> deletion was rejected by the registrant <%= @domain.registrant_name %>.
<br><br> <br><br>
Best Regards,<br> Best Regards,<br>
Estonian Internet Foundation Estonian Internet Foundation

View file

@ -1,15 +1,15 @@
Tere, Tere
Domeeni <%= @domain.name %> kustutamise taotlus on registreerija <%= @domain.registrar_name %> poolt tagasi lükatud. Domeeni <%= @domain.name %> kustutamise taotlus on registreerija <%= @domain.registrant_name %> poolt tagasi lükatud.
Lugupidamisega Lugupidamisega
Eesti Interneti SA Eesti Interneti Sihtasutus
-------------------------------------- --------------------------------------
Hi, Hi,
Domain <%= @domain.name %> deletion rejected. Domain <%= @domain.name %> deletion was rejected by the registrant <%= @domain.registrant_name %>.
Best Regards, Best Regards,
Estonian Internet Foundation Estonian Internet Foundation

View file

@ -1,25 +1,25 @@
Tere, Tere
<br><br> <br><br>
Registrisse laekus taotlus domeeni <%= @domain.name %> kustutamiseks. Palun veenduge, et muudatus on korrektne ning probleemide korral pöörduge oma registripidaja poole. Teie registripidaja on <%= @domain.registrar_name %> Registrisse laekus taotlus domeeni <%= @domain.name %> kustutamiseks. Palun veenduge, et muudatus on korrektne ning probleemide korral pöörduge oma registripidaja <%= @domain.registrar_name %> poole.
<br><br> <br><br>
Muudatuse kinnitamiseks külastage palun allolevat võrgulehekülge, kontrollige uuesti üle muudatuse andmed ning vajutage nuppu kinnitan: Muudatuse kinnitamiseks külastage palun allolevat lehekülge, kontrollige uuesti üle muudatuse andmed ning vajutage nuppu kinnitan.
<br><br> <br><br>
Taotlus on aktiivne <%= Setting.expire_pending_confirmation %> tundi ja lükatakse automaatselt tagasi kui te seda enne ise ei kinnita või tagasi lükka.<br> Taotlus on aktiivne <%= Setting.expire_pending_confirmation %> tundi ja lükatakse automaatselt tagasi kui te seda enne ise ei kinnita või tagasi lükka.<br>
<%= link_to @verification_url, @verification_url %> <%= link_to @verification_url, @verification_url %>
<br><br> <br><br>
Lugupidamisega<br> Lugupidamisega<br>
Eesti Interneti SA Eesti Interneti Sihtasutus
<br><br> <br><br>
<hr> <hr>
<br><br> <br><br>
Hi, Hi,
<br><br> <br><br>
Application for deletion of your domain <%= @domain.name %> has been filed. Please make sure that the application is correct. Incase of problems please turn to your registrar. Your registrar is <%= @domain.registrar_name %> Application for deletion of your domain <%= @domain.name %> has been filed. Please make sure that the application is correct. Incase of problems please contact your registrar <%= @domain.registrar_name %>.
<br><br> <br><br>
To confirm the update please visit this website, once again review the data and press approve:<br> To confirm the update please visit this website, once again review the data and press approve:<br>
<%= link_to @verification_url, @verification_url %> <%= link_to @verification_url, @verification_url %>
<br><br> <br><br>
The application will remain in pending status for <%= Setting.expire_pending_confirmation %> hrs and will be automaticcally rejected if it is not approved nor rejected before. The application will remain in pending status for <%= Setting.expire_pending_confirmation %> hrs and will be automatically rejected if it is not approved nor rejected before.
<br><br> <br><br>
Best Regards,<br> Best Regards,<br>
Estonian Internet Foundation Estonian Internet Foundation

View file

@ -1,25 +1,25 @@
Tere, Tere
Registrisse laekus taotlus domeeni <%= @domain.name %> kustutamiseks. Palun veenduge, et muudatus on korrektne ning probleemide korral pöörduge oma registripidaja poole. Teie registripidaja on <%= @domain.registrar_name %> Registrisse laekus taotlus domeeni <%= @domain.name %> kustutamiseks. Palun veenduge, et muudatus on korrektne ning probleemide korral pöörduge oma registripidaja <%= @domain.registrar_name %> poole.
Muudatuse kinnitamiseks külastage palun allolevat võrgulehekülge, kontrollige uuesti üle muudatuse andmed ning vajutage nuppu kinnitan: Muudatuse kinnitamiseks külastage palun allolevat lehekülge, kontrollige uuesti üle muudatuse andmed ning vajutage nuppu kinnitan.
Taotlus on aktiivne <%= Setting.expire_pending_confirmation %> tundi ja lükatakse automaatselt tagasi kui te seda enne ise ei kinnita või tagasi lükka. Taotlus on aktiivne <%= Setting.expire_pending_confirmation %> tundi ja lükatakse automaatselt tagasi kui te seda enne ise ei kinnita või tagasi lükka.
<%= link_to @verification_url, @verification_url %> <%= link_to @verification_url, @verification_url %>
Lugupidamisega Lugupidamisega
Eesti Interneti SA Eesti Interneti Sihtasutus
-------------------------------------- --------------------------------------
Hi, Hi,
Application for deletion of your domain <%= @domain.name %> has been filed. Please make sure that the application is correct. Incase of problems please turn to your registrar. Your registrar is <%= @domain.registrar_name %> Application for deletion of your domain <%= @domain.name %> has been filed. Please make sure that the application is correct. Incase of problems please contact your registrar <%= @domain.registrar_name %>.
To confirm the update please visit this website, once again review the data and press approve: To confirm the update please visit this website, once again review the data and press approve:
<%= link_to @verification_url, @verification_url %> <%= link_to @verification_url, @verification_url %>
The application will remain in pending status for <%= Setting.expire_pending_confirmation %> hrs and will be automaticcally rejected if it is not approved nor rejected before. The application will remain in pending status for <%= Setting.expire_pending_confirmation %> hrs and will be automatically rejected if it is not approved nor rejected before.
Best Regards, Best Regards,
Estonian Internet Foundation Estonian Internet Foundation

View file

@ -1,19 +1,19 @@
Tere, Tere
<br><br> <br><br>
Domeeni <%= @params[:name] %> registreerija <%= @params[:registrant_name] %> ei kinnitanud tähtaegselt registreerija vahetuse taotlust. Domeeni <%= @params[:name] %> registreerija vahetus on sellest tulenevalt tühistatud. Domeeni <%= @params[:name] %> registreerija <%= @params[:registrant_name] %> ei kinnitanud tähtaegselt registreerija vahetuse taotlust. Domeeni <%= @params[:name] %> registreerija vahetus on sellest tulenevalt tühistatud.
<br><br> <br><br>
Küsimuste korral palun võtke ühendust registripidajaga <%= @params[:registrar_name] %>, kelle kontaktid leiate http://internet.ee/registripidajad/akrediteeritud-registripidajad Küsimuste korral palun võtke ühendust oma registripidajaga <%= @params[:registrar_name] %>. Registripidajate kontaktid leiate aadressilt www.internet.ee/registripidajad.
<br><br> <br><br>
Lugupidamisega<br> Lugupidamisega<br>
Eesti Interneti SA Eesti Interneti Sihtasutus
<br><br> <br><br>
<hr> <hr>
<br><br> <br><br>
Hi, Hi,
<br><br> <br><br>
Domain registrant change has been expired for the domain <%= @params[:name] %>. Domain registrant change request has been expired for the domain <%= @params[:name] %>.
<br><br> <br><br>
Please contact to your registrar <%= @params[:registrar_name] %> if you have any questions. Please contact to your registrar <%= @params[:registrar_name] %> if you have any questions. You can find the registrar's contacts at http://internet.ee/registrars.
<br><br> <br><br>
Best Regards,<br> Best Regards,<br>
Estonian Internet Foundation Estonian Internet Foundation

View file

@ -1,19 +1,19 @@
Tere, Tere
Domeeni <%= @params[:name] %> registreerija <%= @params[:registrant_name] %> ei kinnitanud tähtaegselt registreerija vahetuse taotlust. Domeeni <%= @params[:name] %> registreerija vahetus on sellest tulenevalt tühistatud. Domeeni <%= @params[:name] %> registreerija <%= @params[:registrant_name] %> ei kinnitanud tähtaegselt registreerija vahetuse taotlust. Domeeni <%= @params[:name] %> registreerija vahetus on sellest tulenevalt tühistatud.
Küsimuste korral palun võtke ühendust registripidajaga <%= @params[:registrar_name] %>, kelle kontaktid leiate http://internet.ee/registripidajad/akrediteeritud-registripidajad Küsimuste korral palun võtke ühendust oma registripidajaga <%= @params[:registrar_name] %>. Registripidajate kontaktid leiate aadressilt www.internet.ee/registripidajad.
Lugupidamisega Lugupidamisega
Eesti Interneti SA Eesti Interneti Sihtasutus
-------------------------------------- --------------------------------------
Hi, Hi,
Domain registrant change has been expired for the domain <%= @params[:name] %>. Domain registrant change request has been expired for the domain <%= @params[:name] %>.
Please contact to your registrar <%= @params[:registrar_name] %> if you have any questions. Please contact to your registrar <%= @params[:registrar_name] %> if you have any questions. You can find the registrar's contacts at http://internet.ee/registrars.
Best Regards, Best Regards,
Estonian Internet Foundation Estonian Internet Foundation

View file

@ -1,8 +1,8 @@
Tere, Tere
<br><br> <br><br>
Registripidaja <%= @params[:registrar_name] %> vahendusel on algatatud <%= @params[:name] %> domeeni omanikuvahetuse protseduur. Registripidaja <%= @params[:registrar_name] %> vahendusel on algatatud <%= @params[:name] %> domeeni omanikuvahetuse protseduur.
<br><br> <br><br>
Palun veenduge, et muudatus on korrektne ning probleemide korral pöörduge oma registripidaja poole. Teie registripidaja on <%= @params[:registrar_name] %> Palun veenduge, et muudatus on korrektne ning probleemide korral pöörduge oma registripidaja <%= @params[:registrar_name] %> poole.
<br><br> <br><br>
Uue registreerija andmed:<br> Uue registreerija andmed:<br>
Nimi: <%= @params[:registrant_name] %><br> Nimi: <%= @params[:registrant_name] %><br>
@ -15,14 +15,14 @@ Tänav: <%= @params[:registrant_street] %><br>
Linn: <%= @params[:registrant_city] %><br> Linn: <%= @params[:registrant_city] %><br>
Riik: <%= @params[:registrant_country] %> Riik: <%= @params[:registrant_country] %>
<br><br> <br><br>
Juhime Teie tähelepanu asjaolule, et omanikuvahetuse protseduur viiaks lõpule vaid juhul, kui domeeni hetkel kehtiv registreerija <%= @params[:old_registrant_name] %> omanikuvahetuse tähtaegselt kinnitab. Juhime Teie tähelepanu asjaolule, et omanikuvahetuse protseduur viiakse lõpule vaid juhul, kui domeeni hetkel kehtiv registreerija <%= @params[:old_registrant_name] %> omanikuvahetuse tähtaegselt kinnitab.
<br><br> <br><br>
Juhul kui <%= @params[:old_registrant_name] %> lükkab omanikuvahtuse taotluse tagasi või ei anna kinnitust enne <%= Setting.expire_pending_confirmation %> tundi, omanikuvahetuse protseduur tühistatakse. Juhul kui <%= @params[:old_registrant_name] %> lükkab omanikuvahetuse taotluse tagasi või ei anna kinnitust enne <%= Setting.expire_pending_confirmation %> tundi, omanikuvahetuse protseduur tühistatakse.
<br><br> <br><br>
Küsimuste korral palun võtke ühendust registripidajaga <%= @params[:registrar_name] %>, kelle kontaktid leiate http://internet.ee/registripidajad/akrediteeritud-registripidajad Küsimuste korral palun võtke ühendust registripidajaga <%= @params[:registrar_name] %>. Registripidajate kontaktid leiate aadressilt www.internet.ee/registripidajad.
<br><br> <br><br>
Lugupidamisega<br> Lugupidamisega<br>
Eesti Interneti SA Eesti Interneti Sihtasutus
<br><br> <br><br>
<hr> <hr>
<br><br> <br><br>
@ -30,6 +30,8 @@ Hi,
<br><br> <br><br>
Registrant change process for the domain <%= @params[:name] %> has been started. Registrant change process for the domain <%= @params[:name] %> has been started.
<br><br> <br><br>
Please verify the details of the following change request. In case of problems contact your registrar <%= @params[:registrar_name] %>
<br><br>
New registrant:<br> New registrant:<br>
Name: <%= @params[:registrant_name] %><br> Name: <%= @params[:registrant_name] %><br>
<% if @params[:registrant_priv] %> <% if @params[:registrant_priv] %>
@ -41,7 +43,11 @@ Street: <%= @params[:registrant_street] %><br>
City: <%= @params[:registrant_city] %><br> City: <%= @params[:registrant_city] %><br>
Country: <%= @params[:registrant_country] %> Country: <%= @params[:registrant_country] %>
<br><br> <br><br>
Please contact to your registrar <%= @params[:registrar_name] %> if you have any questions. The registrant change procedure will be completed only after the current registrant <%= @params[:old_registrant_name] %> has approved it.
<br><br>
Change request will be cancelled in case <%= @params[:old_registrant_name] %> rejects or does not approve it in <%= Setting.expire_pending_confirmation %> hours.
<br><br>
Please contact registrar <%= @params[:registrar_name] %> in case of questions. You can find the registrar's contacts at http://internet.ee/registrars.
<br><br> <br><br>
Best Regards,<br> Best Regards,<br>
Estonian Internet Foundation Estonian Internet Foundation

View file

@ -1,8 +1,8 @@
Tere, Tere
Registripidaja <%= @params[:registrar_name] %> vahendusel on algatatud <%= @params[:name] %> domeeni omanikuvahetuse protseduur. Registripidaja <%= @params[:registrar_name] %> vahendusel on algatatud <%= @params[:name] %> domeeni omanikuvahetuse protseduur.
Palun veenduge, et muudatus on korrektne ning probleemide korral pöörduge oma registripidaja poole. Teie registripidaja on <%= @params[:registrar_name] %> Palun veenduge, et muudatus on korrektne ning probleemide korral pöörduge oma registripidaja <%= @params[:registrar_name] %> poole.
Uue registreerija andmed: Uue registreerija andmed:
Nimi: <%= @params[:registrant_name] %> Nimi: <%= @params[:registrant_name] %>
@ -15,14 +15,14 @@ Tänav: <%= @params[:registrant_street] %>
Linn: <%= @params[:registrant_city] %> Linn: <%= @params[:registrant_city] %>
Riik: <%= @params[:registrant_country] %> Riik: <%= @params[:registrant_country] %>
Juhime Teie tähelepanu asjaolule, et omanikuvahetuse protseduur viiaks lõpule vaid juhul, kui domeeni hetkel kehtiv registreerija <%= @params[:old_registrant_name] %> omanikuvahetuse tähtaegselt kinnitab. Juhime Teie tähelepanu asjaolule, et omanikuvahetuse protseduur viiakse lõpule vaid juhul, kui domeeni hetkel kehtiv registreerija <%= @params[:old_registrant_name] %> omanikuvahetuse tähtaegselt kinnitab.
Juhul kui <%= @params[:old_registrant_name] %> lükkab omanikuvahtuse taotluse tagasi või ei anna kinnitust enne <%= Setting.expire_pending_confirmation %> tundi, omanikuvahetuse protseduur tühistatakse. Juhul kui <%= @params[:old_registrant_name] %> lükkab omanikuvahetuse taotluse tagasi või ei anna kinnitust enne <%= Setting.expire_pending_confirmation %> tundi, omanikuvahetuse protseduur tühistatakse.
Küsimuste korral palun võtke ühendust registripidajaga <%= @params[:registrar_name] %>, kelle kontaktid leiate http://internet.ee/registripidajad/akrediteeritud-registripidajad Küsimuste korral palun võtke ühendust registripidajaga <%= @params[:registrar_name] %>. Registripidajate kontaktid leiate aadressilt www.internet.ee/registripidajad.
Lugupidamisega Lugupidamisega
Eesti Interneti SA Eesti Interneti Sihtasutus
-------------------------------------- --------------------------------------
@ -30,6 +30,8 @@ Hi,
Registrant change process for the domain <%= @params[:name] %> has been started. Registrant change process for the domain <%= @params[:name] %> has been started.
Please verify the details of the following change request. In case of problems contact your registrar <%= @params[:registrar_name] %>
New registrant: New registrant:
Name: <%= @params[:registrant_name] %> Name: <%= @params[:registrant_name] %>
<% if @params[:registrant_priv] %> <% if @params[:registrant_priv] %>
@ -41,7 +43,11 @@ Street: <%= @params[:registrant_street] %>
City: <%= @params[:registrant_city] %> City: <%= @params[:registrant_city] %>
Country: <%= @params[:registrant_country] %> Country: <%= @params[:registrant_country] %>
Please contact to your registrar <%= @params[:registrar_name] %> if you have any questions. The registrant change procedure will be completed only after the current registrant <%= @params[:old_registrant_name] %> has approved it.
Change request will be cancelled in case <%= @params[:old_registrant_name] %> rejects or does not approve it in <%= Setting.expire_pending_confirmation %> hours.
Please contact registrar <%= @params[:registrar_name] %> in case of questions. You can find the registrar's contacts at http://internet.ee/registrars.
Best Regards, Best Regards,
Estonian Internet Foundation Estonian Internet Foundation

View file

@ -1,19 +1,19 @@
Tere, Tere
<br><br> <br><br>
Domeeni <%= @params[:name] %> registreerija <%= @params[:old_registrant_name] %> on domeeni registreerija vahetamise taotluse tagasi lükanud. Domeeni <%= @params[:name] %> registreerija <%= @params[:old_registrant_name] %> on domeeni registreerija vahetamise taotluse tagasi lükanud.
<br><br> <br><br>
Küsimuste korral palun võtke ühendust registripidajaga <%= @params[:registrar_name] %>, kelle kontaktid leiate http://internet.ee/registripidajad/akrediteeritud-registripidajad Küsimuste korral võtke palun ühendust oma registripidajaga <%= @params[:registrar_name] %>. Registripidajate kontaktid leiate aadressilt www.internet.ee/registripidajad.
<br><br> <br><br>
Lugupidamisega,<br> Lugupidamisega<br>
Eesti Interneti SA Eesti Interneti Sihtasutus
<br><br> <br><br>
<hr> <hr>
<br><br> <br><br>
Hi, Hi,
<br><br> <br><br>
Registrant change was declined for the domain <%= @params[:name] %>. Registrant change for the domain <%= @params[:name] %> was rejected by the registrant <%= @params[:old_registrant_name] %>.
<br><br> <br><br>
Please contact to your registrar <%= @params[:registrar_name] %> if you have any questions. Please contact your registrar <%= @params[:registrar_name] %> if you have any questions. You can find the registrar's contacts at http://internet.ee/registrars.
<br><br> <br><br>
Best Regards,<br> Best Regards,<br>
Estonian Internet Foundation Estonian Internet Foundation

View file

@ -1,19 +1,20 @@
Tere, Tere
Domeeni <%= @params[:name] %> registreerija <%= @params[:old_registrant_name] %> on domeeni registreerija vahetamise taotluse tagasi lükanud. Domeeni <%= @params[:name] %> registreerija <%= @params[:old_registrant_name] %> on domeeni registreerija vahetamise taotluse tagasi lükanud.
Küsimuste korral palun võtke ühendust registripidajaga <%= @params[:registrar_name] %>, kelle kontaktid leiate http://internet.ee/registripidajad/akrediteeritud-registripidajad Küsimuste korral võtke palun ühendust oma registripidajaga <%= @params[:registrar_name] %>. Registripidajate kontaktid leiate aadressilt www.internet.ee/registripidajad.
Lugupidamisega Lugupidamisega
Eesti Interneti SA Eesti Interneti Sihtasutus
-------------------------------------- --------------------------------------
Hi, Hi,
Registrant change was declined for the domain <%= @params[:name] %>. Registrant change for the domain <%= @params[:name] %> was rejected by the registrant <%= @params[:old_registrant_name] %>
.
Please contact to your registrar <%= @params[:registrar_name] %> if you have any questions. Please contact your registrar <%= @params[:registrar_name] %> if you have any questions. You can find the registrar's contacts at http://internet.ee/registrars.
Best Regards, Best Regards,
Estonian Internet Foundation Estonian Internet Foundation

View file

@ -1,6 +1,6 @@
Tere, Tere
<br><br> <br><br>
Registrisse laekus taotlus domeeni <%= @params[:name] %> registreerija vahetuseks. Palun veenduge, et muudatus on korrektne ning probleemide korral pöörduge oma registripidaja poole. Teie registripidaja on <%= @params[:registrar_name] %> Registrisse laekus taotlus domeeni <%= @params[:name] %> registreerija vahetuseks. Palun veenduge, et muudatus on korrektne ning probleemide korral pöörduge oma registripidaja <%= @params[:registrar_name] %> poole.
<br><br> <br><br>
Uue registreerija andmed:<br> Uue registreerija andmed:<br>
Nimi: <%= @params[:registrant_name] %><br> Nimi: <%= @params[:registrant_name] %><br>
@ -13,14 +13,14 @@ Tänav: <%= @params[:registrant_street] %><br>
Linn: <%= @params[:registrant_city] %><br> Linn: <%= @params[:registrant_city] %><br>
Riik: <%= @params[:registrant_country] %> Riik: <%= @params[:registrant_country] %>
<br><br> <br><br>
Taotlus on aktiivne <%= Setting.expire_pending_confirmation %> tundi ja lükatakse automaatselt tagasi kui te seda enne ise ei kinnita või tagasi lükka. Taotlus on aktiivne <%= Setting.expire_pending_confirmation %> tundi ja lükatakse automaatselt tagasi kui te seda enne ei kinnita või tagasi lükka.
<br><br> <br><br>
Muudatuse kinnitamiseks külastage palun allolevat võrgulehekülge, kontrollige uuesti üle muudatuse andmed ning vajutage nuppu kinnitan:<br> Muudatuse kinnitamiseks külastage palun allolevat lehekülge, kontrollige uuesti üle muudatuse andmed ning vajutage nuppu kinnitan:<br>
<%= link_to @params[:verification_url], @params[:verification_url] %> <%= link_to @params[:verification_url], @params[:verification_url] %>
<br><br> <br><br>
Lugupidamisega<br> Lugupidamisega<br>
Eesti Interneti SA Eesti Interneti Sihtasutus
<br><br> <br><br>
<hr> <hr>
<br><br> <br><br>

View file

@ -1,6 +1,6 @@
Tere, Tere
Registrisse laekus taotlus domeeni <%= @params[:name] %> registreerija vahetuseks. Palun veenduge, et muudatus on korrektne ning probleemide korral pöörduge oma registripidaja poole. Teie registripidaja on <%= @params[:registrar_name] %> Registrisse laekus taotlus domeeni <%= @params[:name] %> registreerija vahetuseks. Palun veenduge, et muudatus on korrektne ning probleemide korral pöörduge oma registripidaja <%= @params[:registrar_name] %> poole.
Uue registreerija andmed: Uue registreerija andmed:
Nimi: <%= @params[:registrant_name] %> Nimi: <%= @params[:registrant_name] %>
@ -13,12 +13,12 @@ Tänav: <%= @params[:registrant_street] %>
Linn: <%= @params[:registrant_city] %> Linn: <%= @params[:registrant_city] %>
Riik: <%= @params[:registrant_country] %> Riik: <%= @params[:registrant_country] %>
Taotlus on aktiivne <%= Setting.expire_pending_confirmation %> tundi ja lükatakse automaatselt tagasi kui te seda enne ise ei kinnita või tagasi lükka. Taotlus on aktiivne <%= Setting.expire_pending_confirmation %> tundi ja lükatakse automaatselt tagasi kui te seda enne ei kinnita või tagasi lükka.
Muudatuse kinnitamiseks külastage palun allolevat võrgulehekülge, kontrollige uuesti üle muudatuse andmed ning vajutage nuppu kinnitan: Muudatuse kinnitamiseks külastage palun allolevat lehekülge, kontrollige uuesti üle muudatuse andmed ning vajutage nuppu kinnitan:
<%= @params[:verification_url] %> <%= @params[:verification_url] %>
Lugupidamisega Lugupidamisega
Eesti Interneti SA Eesti Interneti Sihtasutus
-------------------------------------- --------------------------------------

View file

@ -1,39 +1,39 @@
Tere, Tere
<br><br> <br><br>
Domeeni <%= @params[:name] %> registreerija vahetuse taotlus on kinnitatud ning andmed registris uuendatud. Domeeni <%= @domain.name %> registreerija vahetuse taotlus on kinnitatud ning andmed registris uuendatud.
<br><br> <br><br>
Uue registreerija andmed:<br> Uue registreerija andmed:<br>
Nimi: <%= @params[:registrant_name] %><br> Nimi: <%= @new_registrant.name %><br>
<% if @params[:registrant_priv] %> <% if @new_registrant.priv? %>
Isikukood: <%= @params[:registrant_ident] %><br> Isikukood: <%= @new_registrant.ident %><br>
<% else %> <% else %>
Äriregistrikood: <%= @params[:registrant_ident] %><br> Äriregistrikood: <%= @new_registrant.ident %><br>
<% end %> <% end %>
Epost: <%= @params[:registrant_email] %><br> Epost: <%= @new_registrant.email %><br>
Tänav: <%= @params[:registrant_street] %><br> Tänav: <%= @new_registrant.street %><br>
Linn: <%= @params[:registrant_city] %><br> Linn: <%= @new_registrant.city %><br>
Riik: <%= @params[:registrant_country] %> Riik: <%= @new_registrant.country.name %>
<br><br> <br><br>
Lugupidamisega<br> Lugupidamisega<br>
Eesti Interneti SA Eesti Interneti Sihtasutus
<br><br> <br><br>
<hr> <hr>
<br><br> <br><br>
Hi, Hi,
<br><br> <br><br>
Process for changing registrant of the domain <%= @params[:name] %> has been approved and the data in the registry is updated. Process for changing registrant of the domain <%= @domain.name %> has been approved and the data in the registry is updated.
<br><br> <br><br>
New registrant:<br> New registrant:<br>
Name: <%= @params[:registrant_name] %><br> Name: <%= @new_registrant.name %><br>
<% if @params[:registrant_priv] %> <% if @new_registrant.priv? %>
Personal code: <%= @params[:registrant_ident] %><br> Personal code: <%= @new_registrant.ident %><br>
<% else %> <% else %>
Business Registry code: <%= @params[:registrant_ident] %><br> Business Registry code: <%= @new_registrant.ident %><br>
<% end %> <% end %>
E-mail: <%= @params[:registrant_email] %><br> E-mail: <%= @new_registrant.email %><br>
Street: <%= @params[:registrant_street] %><br> Street: <%= @new_registrant.street %><br>
City: <%= @params[:registrant_city] %><br> City: <%= @new_registrant.city %><br>
Country: <%= @params[:registrant_country] %> Country: <%= @new_registrant.country.name %>
<br><br> <br><br>
Best Regards,<br> Best Regards,<br>
Estonian Internet Foundation Estonian Internet Foundation

View file

@ -1,39 +1,41 @@
Tere, Tere
Domeeni <%= @params[:name] %> registreerija vahetuse taotlus on kinnitatud ning andmed registris uuendatud. Domeeni <%= @domain.name %> registreerija vahetuse taotlus on kinnitatud ning andmed registris uuendatud.
Uue registreerija andmed: Uue registreerija andmed:
Nimi: <%= @params[:registrant_name] %> Nimi: <%= @new_registrant.name %>
<% if @params[:registrant_priv] %>
Isikukood: <%= @params[:registrant_ident] %> <% if @new_registrant.priv? %>
Isikukood: <%= @new_registrant.ident %>
<% else %> <% else %>
Äriregistrikood: <%= @params[:registrant_ident] %> Äriregistrikood: <%= @new_registrant.ident %>
<% end %> <% end %>
Epost: <%= @params[:registrant_email] %> Epost: <%= @new_registrant.email %>
Tänav: <%= @params[:registrant_street] %> Tänav: <%= @new_registrant.street %>
Linn: <%= @params[:registrant_city] %> Linn: <%= @new_registrant.city %>
Riik: <%= @params[:registrant_country] %> Riik: <%= @new_registrant.country.name %>
Lugupidamisega Lugupidamisega
Eesti Interneti SA Eesti Interneti Sihtasutus
-------------------------------------- --------------------------------------
Hi, Hi,
Process for changing registrant of the domain <%= @params[:name] %> has been approved and the data in the registry is updated. Process for changing registrant of the domain <%= @domain.name %> has been approved and the data in the registry is updated.
New registrant: New registrant:
Name: <%= @params[:registrant_name] %> Name: <%= @new_registrant.name %>
<% if @params[:registrant_priv] %>
Personal code: <%= @params[:registrant_ident] %> <% if @new_registrant.priv? %>
Personal code: <%= @new_registrant.ident %>
<% else %> <% else %>
Business Registry code: <%= @params[:registrant_ident] %> Business Registry code: <%= @new_registrant.ident %>
<% end %> <% end %>
E-mail: <%= @params[:registrant_email] %> E-mail: <%= @new_registrant.email %>
Street: <%= @params[:registrant_street] %> Street: <%= @new_registrant.street %>
City: <%= @params[:registrant_city] %> City: <%= @new_registrant.city %>
Country: <%= @params[:registrant_country] %> Country: <%= @new_registrant.country.name %>
Best Regards, Best Regards,
Estonian Internet Foundation Estonian Internet Foundation

View file

@ -1,39 +1,39 @@
Tere, Tere
<br><br> <br><br>
Domeeni <%= @params[:name] %> registreerija vahetuse taotlus on kinnitatud ning andmed registris uuendatud. Domeeni <%= @domain.name %> registreerija vahetuse taotlus on kinnitatud ning andmed registris uuendatud.
<br><br> <br><br>
Uue registreerija andmed:<br> Uue registreerija andmed:<br>
Nimi: <%= @params[:new_registrant_name] %><br> Nimi: <%= @new_registrant.name %><br>
<% if @params[:registrant_priv] %> <% if @new_registrant.priv? %>
Isikukood: <%= @params[:registrant_ident] %><br> Isikukood: <%= @new_registrant.ident %><br>
<% else %> <% else %>
Äriregistrikood: <%= @params[:registrant_ident] %><br> Äriregistrikood: <%= @new_registrant.ident %><br>
<% end %> <% end %>
Epost: <%= @params[:registrant_email] %><br> Epost: <%= @new_registrant.email %><br>
Tänav: <%= @params[:registrant_street] %><br> Tänav: <%= @new_registrant.street %><br>
Linn: <%= @params[:registrant_city] %><br> Linn: <%= @new_registrant.city %><br>
Riik: <%= @params[:registrant_country] %> Riik: <%= @new_registrant.country.name %>
<br><br> <br><br>
Lugupidamisega<br> Lugupidamisega<br>
Eesti Interneti SA Eesti Interneti Sihtasutus
<br><br> <br><br>
<hr> <hr>
<br><br> <br><br>
Hi, Hi,
<br><br> <br><br>
Process for changing registrant of the domain <%= @params[:name] %> has been approved and the data in the registry is updated. Process for changing registrant of the domain <%= @domain.name %> has been approved and the data in the registry is updated.
<br><br> <br><br>
New registrant:<br> New registrant:<br>
Name: <%= @params[:new_registrant_name] %><br> Name: <%= @new_registrant.name %><br>
<% if @params[:registrant_priv] %> <% if @new_registrant.priv? %>
Personal code: <%= @params[:registrant_ident] %><br> Personal code: <%= @new_registrant.ident %><br>
<% else %> <% else %>
Business Registry code: <%= @params[:registrant_ident] %><br> Business Registry code: <%= @new_registrant.ident %><br>
<% end %> <% end %>
E-mail: <%= @params[:registrant_email] %><br> E-mail: <%= @new_registrant.email %><br>
Street: <%= @params[:registrant_street] %><br> Street: <%= @new_registrant.street %><br>
City: <%= @params[:registrant_city] %><br> City: <%= @new_registrant.city %><br>
Country: <%= @params[:registrant_country] %> Country: <%= @new_registrant.country.name %>
<br><br> <br><br>
Best Regards,<br> Best Regards,<br>
Estonian Internet Foundation Estonian Internet Foundation

View file

@ -1,41 +1,41 @@
Tere, Tere
Domeeni <%= @params[:name] %> registreerija vahetuse taotlus on kinnitatud ning andmed registris uuendatud. Domeeni <%= @domain.name %> registreerija vahetuse taotlus on kinnitatud ning andmed registris uuendatud.
Uue registreerija andmed: Uue registreerija andmed:
Nimi: <%= @params[:new_registrant_name] %> Nimi: <%= @new_registrant.name %>
<% if @params[:registrant_priv] %> <% if @new_registrant.priv? %>
Isikukood: <%= @params[:registrant_ident] %> Isikukood: <%= @new_registrant.ident %>
<% else %> <% else %>
Äriregistrikood: <%= @params[:registrant_ident] %> Äriregistrikood: <%= @new_registrant.ident %>
<% end %> <% end %>
Epost: <%= @params[:registrant_email] %> Epost: <%= @new_registrant.email %>
Tänav: <%= @params[:registrant_street] %> Tänav: <%= @new_registrant.street %>
Linn: <%= @params[:registrant_city] %> Linn: <%= @new_registrant.city %>
Riik: <%= @params[:registrant_country] %> Riik: <%= @new_registrant.country.name %>
Lugupidamisega Lugupidamisega
Eesti Interneti SA Eesti Interneti Sihtasutus
-------------------------------------- --------------------------------------
Hi, Hi,
Process for changing registrant of the domain <%= @params[:name] %> has been approved and the data in the registry is updated. Process for changing registrant of the domain <%= @domain.name %> has been approved and the data in the registry is updated.
New registrant: New registrant:
Name: <%= @params[:new_registrant_name] %> Name: <%= @new_registrant.name %>
<% if @params[:registrant_priv] %> <% if @new_registrant.priv? %>
Personal code: <%= @params[:registrant_ident] %> Personal code: <%= @new_registrant.ident %>
<% else %> <% else %>
Business Registry code: <%= @params[:registrant_ident] %> Business Registry code: <%= @new_registrant.ident %>
<% end %> <% end %>
E-mail: <%= @params[:registrant_email] %> E-mail: <%= @new_registrant.email %>
Street: <%= @params[:registrant_street] %> Street: <%= @new_registrant.street %>
City: <%= @params[:registrant_city] %> City: <%= @new_registrant.city %>
Country: <%= @params[:registrant_country] %> Country: <%= @new_registrant.country.name %>
Best Regards, Best Regards,
Estonian Internet Foundation Estonian Internet Foundation

View file

@ -2,6 +2,9 @@
.form-signin.col-md-6.center-block.text-center .form-signin.col-md-6.center-block.text-center
%h2.form-signin-heading.text-center= t(:log_in) %h2.form-signin-heading.text-center= t(:log_in)
%hr %hr
.row
=t "only_estonian_residets_can_signin"
%br
= link_to '/registrant/login/mid' do = link_to '/registrant/login/mid' do
= image_tag 'mid.gif' = image_tag 'mid.gif'
= link_to '/registrant/id', method: :post do = link_to '/registrant/id', method: :post do

View file

@ -6,6 +6,12 @@
.panel-heading.clearfix .panel-heading.clearfix
= t(:legal_document) = t(:legal_document)
.panel-body .panel-body
.form-group
.col-md-4.control-label
= label_tag 'domain[verified]', t(:verified)
.col-md-6
= check_box_tag 'domain[verified]', '1', params[:verified].eql?('1'), onclick: "return (confirm('#{t(:verified_confirm)}') ? true : false);"
.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'

View file

@ -24,6 +24,13 @@
= text_field_tag 'domain[registrant_helper]', contacts.find_by(code: @domain_params[:registrant]).try(:search_name), = text_field_tag 'domain[registrant_helper]', contacts.find_by(code: @domain_params[:registrant]).try(:search_name),
class: 'form-control', data: {autocomplete: search_contacts_registrar_domains_path}, required: true class: 'form-control', data: {autocomplete: search_contacts_registrar_domains_path}, required: true
- if params[:domain_name]
.form-group
.col-md-3.control-label
= label_tag :verified, t(:verified)
.col-md-7
= check_box_tag 'domain[verified]', '1', @domain_params[:verified].eql?('1'), onclick: "return (confirm('#{t(:verified_confirm)}') ? true : false);"
- unless params[:domain_name] - unless params[:domain_name]
.form-group .form-group
.col-md-3.control-label .col-md-3.control-label

View file

@ -6,10 +6,12 @@
%thead %thead
%tr %tr
%th{class: 'col-xs-4'}= t(:type) %th{class: 'col-xs-4'}= t(:type)
%th{class: 'col-xs-8'}= t(:id) %th{class: 'col-xs-4'}= t(:name)
%th{class: 'col-xs-4'}= t(:id)
%tbody %tbody
- @data.css('contact').each do |x| - @data.css('contact').each do |x|
- registrant = Contact.find_by_code(x.text)
%tr %tr
%td= x['type'] %td= x['type']
%td= registrant.name
%td= x.text %td= x.text

Some files were not shown because too many files have changed in this diff Show more