From deb3b9a1995082b70f3b375368b9c72384f93e58 Mon Sep 17 00:00:00 2001 From: Stas Date: Fri, 8 Apr 2016 17:03:40 +0300 Subject: [PATCH 01/22] 117131083-force_delete_at_calculation_changed --- app/models/domain.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/domain.rb b/app/models/domain.rb index 05804d02f..dbdbe2d42 100644 --- a/app/models/domain.rb +++ b/app/models/domain.rb @@ -575,7 +575,7 @@ class Domain < ActiveRecord::Base statuses << DomainStatus::SERVER_MANUAL_INZONE end - self.force_delete_at = Time.zone.now + Setting.redemption_grace_period.days unless force_delete_at + self.force_delete_at = (Time.zone.now + 31.days).beginning_of_day unless force_delete_at transaction do save!(validate: false) registrar.messages.create!( From ba1b4dbf25f735d610509a269f2d602d907d4816 Mon Sep 17 00:00:00 2001 From: Stas Date: Mon, 11 Apr 2016 15:56:26 +0300 Subject: [PATCH 02/22] 117131083-force_delete_at_calculation --- app/models/domain.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/domain.rb b/app/models/domain.rb index dbdbe2d42..b4cadb106 100644 --- a/app/models/domain.rb +++ b/app/models/domain.rb @@ -575,7 +575,7 @@ class Domain < ActiveRecord::Base statuses << DomainStatus::SERVER_MANUAL_INZONE end - self.force_delete_at = (Time.zone.now + 31.days).beginning_of_day unless force_delete_at + self.force_delete_at = (Time.zone.now + Setting.redemption_grace_period.days + 1.day).beginning_of_day unless force_delete_at transaction do save!(validate: false) registrar.messages.create!( From 178818288d1ce7f43b6592102971e82d632c34eb Mon Sep 17 00:00:00 2001 From: Stas Date: Mon, 11 Apr 2016 16:02:42 +0300 Subject: [PATCH 03/22] 117131083-force_delete_at_calculation --- app/models/domain.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/domain.rb b/app/models/domain.rb index b4cadb106..125fa5c75 100644 --- a/app/models/domain.rb +++ b/app/models/domain.rb @@ -575,7 +575,7 @@ class Domain < ActiveRecord::Base statuses << DomainStatus::SERVER_MANUAL_INZONE end - self.force_delete_at = (Time.zone.now + Setting.redemption_grace_period.days + 1.day).beginning_of_day unless force_delete_at + self.force_delete_at = (Time.zone.now + (Setting.redemption_grace_period.days + 1.day)).beginning_of_day unless force_delete_at transaction do save!(validate: false) registrar.messages.create!( From 0089ed476d7f8a3311b52f26a17fe864ead80638 Mon Sep 17 00:00:00 2001 From: Stas Date: Mon, 11 Apr 2016 16:15:08 +0300 Subject: [PATCH 04/22] 116043697-save_added --- app/jobs/domain_delete_confirm_job.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/jobs/domain_delete_confirm_job.rb b/app/jobs/domain_delete_confirm_job.rb index cce230234..0bd129d42 100644 --- a/app/jobs/domain_delete_confirm_job.rb +++ b/app/jobs/domain_delete_confirm_job.rb @@ -13,6 +13,7 @@ class DomainDeleteConfirmJob < Que::Job domain.poll_message!(:poll_pending_delete_rejected_by_registrant) domain.cancel_pending_delete end + domain.save(validate: false) destroy # it's best to destroy the job in the same transaction end end From 00391d358200114357d4d53e1cd10bea0bff5f2a Mon Sep 17 00:00:00 2001 From: Stas Date: Mon, 11 Apr 2016 18:46:49 +0300 Subject: [PATCH 05/22] 115595167-colum_for_api_response --- app/controllers/application_controller.rb | 4 ++++ db/migrate/20160411140719_add_matching_column.rb | 12 ++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 db/migrate/20160411140719_add_matching_column.rb diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index ac26e61a3..e3a611656 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -55,6 +55,10 @@ class ApplicationController < ActionController::Base end end + def info_for_paper_trail + { svTRID: request.svTRID } + end + def user_for_paper_trail user_log_str(current_user) end diff --git a/db/migrate/20160411140719_add_matching_column.rb b/db/migrate/20160411140719_add_matching_column.rb new file mode 100644 index 000000000..9432c0ed2 --- /dev/null +++ b/db/migrate/20160411140719_add_matching_column.rb @@ -0,0 +1,12 @@ +class AddMatchingColumn < ActiveRecord::Migration + + def change + tables = [:log_domains, :log_contacts] + + tables.each do |table| + add_column table, :svTRID, :text + end + end + + +end From acd2c148561a8959eeb742bf0be227fb21e0213e Mon Sep 17 00:00:00 2001 From: Stas Date: Wed, 13 Apr 2016 01:11:13 +0300 Subject: [PATCH 06/22] 117131083-deleted_at_force_delete_at --- app/models/domain.rb | 6 +++--- app/models/epp/domain.rb | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/models/domain.rb b/app/models/domain.rb index 125fa5c75..d5c275f7f 100644 --- a/app/models/domain.rb +++ b/app/models/domain.rb @@ -575,7 +575,7 @@ class Domain < ActiveRecord::Base statuses << DomainStatus::SERVER_MANUAL_INZONE end - self.force_delete_at = (Time.zone.now + (Setting.redemption_grace_period.days + 1.day)).beginning_of_day unless force_delete_at + self.force_delete_at = (Time.zone.now + (Setting.redemption_grace_period.days + 1.day)).beginning_of_day.utc unless force_delete_at transaction do save!(validate: false) registrar.messages.create!( @@ -604,7 +604,7 @@ class Domain < ActiveRecord::Base def set_graceful_expired 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)).beginning_of_day.utc self.statuses |= [DomainStatus::EXPIRED] end @@ -612,7 +612,7 @@ class Domain < ActiveRecord::Base # TODO: currently valid_to attribute update logic is open # 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.delete_at = Time.zone.now + Setting.redemption_grace_period.days + self.delete_at = (Time.zone.now + (Setting.redemption_grace_period.days + 1.day)).beginning_of_day.utc statuses << DomainStatus::EXPIRED end diff --git a/app/models/epp/domain.rb b/app/models/epp/domain.rb index 1f2dd2d54..7bf01c28a 100644 --- a/app/models/epp/domain.rb +++ b/app/models/epp/domain.rb @@ -586,7 +586,7 @@ class Epp::Domain < Domain msg: I18n.t(:object_status_prohibits_operation) } 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)).beginning_of_day.utc set_pending_delete set_server_hold if server_holdable? save(validate: false) From f3fe706eabe538e054ee6e696d9ef2c7b9fb9b99 Mon Sep 17 00:00:00 2001 From: Stas Date: Thu, 14 Apr 2016 17:19:17 +0300 Subject: [PATCH 07/22] 117131083-utc_removed --- app/models/domain.rb | 6 +++--- app/models/epp/domain.rb | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/models/domain.rb b/app/models/domain.rb index d5c275f7f..a2ecc5451 100644 --- a/app/models/domain.rb +++ b/app/models/domain.rb @@ -575,7 +575,7 @@ class Domain < ActiveRecord::Base statuses << DomainStatus::SERVER_MANUAL_INZONE end - self.force_delete_at = (Time.zone.now + (Setting.redemption_grace_period.days + 1.day)).beginning_of_day.utc unless force_delete_at + self.force_delete_at = (Time.zone.now + (Setting.redemption_grace_period.days + 1.day)).beginning_of_day unless force_delete_at transaction do save!(validate: false) registrar.messages.create!( @@ -604,7 +604,7 @@ class Domain < ActiveRecord::Base def set_graceful_expired self.outzone_at = valid_to + Setting.expire_warning_period.days - self.delete_at = (outzone_at + (Setting.redemption_grace_period.days + 1.day)).beginning_of_day.utc + self.delete_at = (outzone_at + (Setting.redemption_grace_period.days + 1.day)).beginning_of_day self.statuses |= [DomainStatus::EXPIRED] end @@ -612,7 +612,7 @@ class Domain < ActiveRecord::Base # TODO: currently valid_to attribute update logic is open # 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.delete_at = (Time.zone.now + (Setting.redemption_grace_period.days + 1.day)).beginning_of_day.utc + self.delete_at = (Time.zone.now + (Setting.redemption_grace_period.days + 1.day)).beginning_of_day statuses << DomainStatus::EXPIRED end diff --git a/app/models/epp/domain.rb b/app/models/epp/domain.rb index 7bf01c28a..8d102178f 100644 --- a/app/models/epp/domain.rb +++ b/app/models/epp/domain.rb @@ -586,7 +586,7 @@ class Epp::Domain < Domain msg: I18n.t(:object_status_prohibits_operation) } unless pending_deletable? - self.delete_at = (Time.zone.now + (Setting.redemption_grace_period.days + 1.day)).beginning_of_day.utc + self.delete_at = (Time.zone.now + (Setting.redemption_grace_period.days + 1.day)).beginning_of_day set_pending_delete set_server_hold if server_holdable? save(validate: false) From 9ace5aafb1294ead273dac2b03feeafbaad60784 Mon Sep 17 00:00:00 2001 From: Stas Date: Thu, 14 Apr 2016 17:22:18 +0300 Subject: [PATCH 08/22] 115595167-matching_column_name_changed --- app/controllers/application_controller.rb | 2 +- db/migrate/20160411140719_add_matching_column.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index e3a611656..fac9d29f4 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -56,7 +56,7 @@ class ApplicationController < ActionController::Base end def info_for_paper_trail - { svTRID: request.svTRID } + { uuid: request.uuid } end def user_for_paper_trail diff --git a/db/migrate/20160411140719_add_matching_column.rb b/db/migrate/20160411140719_add_matching_column.rb index 9432c0ed2..1f0774824 100644 --- a/db/migrate/20160411140719_add_matching_column.rb +++ b/db/migrate/20160411140719_add_matching_column.rb @@ -4,7 +4,7 @@ class AddMatchingColumn < ActiveRecord::Migration tables = [:log_domains, :log_contacts] tables.each do |table| - add_column table, :svTRID, :text + add_column table, :uuid, :text end end From c9c4e82989d1e9ab3bf5ac5aaf08fa27b17456be Mon Sep 17 00:00:00 2001 From: Stas Date: Thu, 14 Apr 2016 17:33:07 +0300 Subject: [PATCH 09/22] 115595167-log_table_list_changed --- db/migrate/20160411140719_add_matching_column.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/db/migrate/20160411140719_add_matching_column.rb b/db/migrate/20160411140719_add_matching_column.rb index 1f0774824..c16aef530 100644 --- a/db/migrate/20160411140719_add_matching_column.rb +++ b/db/migrate/20160411140719_add_matching_column.rb @@ -1,7 +1,12 @@ class AddMatchingColumn < ActiveRecord::Migration def change - tables = [:log_domains, :log_contacts] + tables = [:log_account_activities, :log_accounts, :log_addresses, :log_api_users, :log_bank_statements, + :log_bank_transactions, :log_blocked_domains, :log_certificates, :log_contact_statuses, :log_contacts, + :log_countries, :log_dnskeys, :log_domain_contacts, :log_domain_statuses, :log_domain_transfers, + :log_domains, :log_invoice_items, :log_invoices, :log_keyrelays, :log_messages, :log_nameservers, + :log_pricelists, :log_registrars, :log_reserved_domains, :log_settings, :log_users, :log_white_ips, + :log_zonefile_settings] tables.each do |table| add_column table, :uuid, :text From c09c039f3cac8658ee591e3b889ea151d485caae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20V=C3=B5hmar?= Date: Fri, 15 Apr 2016 10:05:57 +0300 Subject: [PATCH 10/22] changed pending update and delete rejection messages [bug 117124725] --- config/locales/en.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index 6372d401d..fd864ddf3 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -827,16 +827,16 @@ en: domain_registrant_change_confirmed_body: 'You have successfully submitted domain registrant change confirmation. You will receive email confirmation.' registrant_domain_verification_confirmed: 'Domain registrant change has successfully received.' registrant_domain_verification_confirmed_failed: 'Something went wrong.' - domain_registrant_change_rejected_title: 'Domain registrant change has been rejected' - domain_registrant_change_rejected_body: 'You have rejected domain registrant change.' + domain_registrant_change_rejected_title: 'Domain registrant change rejection has been received' + domain_registrant_change_rejected_body: 'You have rejected domain registrant change. You will receive confirmation by email.' registrant_domain_verification_rejected: 'Domain registrant change has been rejected successfully.' registrant_domain_verification_rejected_failed: 'Something went wrong.' domain_delete_title: 'Please confirm or reject domain deletation' domain_delete_body: 'There is a request to delete a domain. Before doing it we need your confirmation.' domain_delete_confirmed_title: 'Domain deletion has been received successfully' domain_delete_confirmed_body: 'You have successfully submitted delete confirmation. You will receive registry final confirmation to email.' - domain_delete_rejected_title: 'Domain deletion has been rejected successfully' - domain_delete_rejected_body: 'You have rejected domain deletion.' + domain_delete_rejected_title: 'Domain deletion rejection has been received successfully' + domain_delete_rejected_body: 'You have rejected pending domain deletion. You will receive confirmation by email.' no_permission: 'No permission' access_denied: 'Access denied' common_name: 'Common name' From 8e1ce321438345b5b5dfcfa9526b34e7bcc5e872 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20V=C3=B5hmar?= Date: Fri, 15 Apr 2016 11:10:40 +0300 Subject: [PATCH 11/22] fixed incorrect pending delete confirm page messages [bug 117124725] --- .../registrant/domain_delete_confirms_controller.rb | 8 ++++---- config/locales/en.yml | 6 +++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/app/controllers/registrant/domain_delete_confirms_controller.rb b/app/controllers/registrant/domain_delete_confirms_controller.rb index f6f05d628..209456808 100644 --- a/app/controllers/registrant/domain_delete_confirms_controller.rb +++ b/app/controllers/registrant/domain_delete_confirms_controller.rb @@ -22,18 +22,18 @@ class Registrant::DomainDeleteConfirmsController < RegistrantController verification_token: params[:token]) if params[:rejected] if @registrant_verification.domain_registrant_delete_reject! - flash[:notice] = t(:registrant_domain_verification_rejected) + flash[:notice] = t(:registrant_domain_delete_rejected) redirect_to registrant_domain_delete_confirm_path(@domain.id, rejected: true) else - flash[:alert] = t(:registrant_domain_verification_rejected_failed) + flash[:alert] = t(:registrant_domain_delete_rejected_failed) return render 'show' end elsif params[:confirmed] if @registrant_verification.domain_registrant_delete_confirm! - flash[:notice] = t(:registrant_domain_verification_confirmed) + flash[:notice] = t(:registrant_domain_delete_confirmed) redirect_to registrant_domain_delete_confirm_path(@domain.id, confirmed: true) else - flash[:alert] = t(:registrant_domain_verification_confirmed_failed) + flash[:alert] = t(:registrant_domain_delete_confirmed_failed) return render 'show' end end diff --git a/config/locales/en.yml b/config/locales/en.yml index fd864ddf3..de5891c77 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -831,10 +831,14 @@ en: domain_registrant_change_rejected_body: 'You have rejected domain registrant change. You will receive confirmation by email.' registrant_domain_verification_rejected: 'Domain registrant change has been rejected successfully.' registrant_domain_verification_rejected_failed: 'Something went wrong.' - domain_delete_title: 'Please confirm or reject domain deletation' + domain_delete_title: 'Please confirm or reject domain deletion' domain_delete_body: 'There is a request to delete a domain. Before doing it we need your confirmation.' + registrant_domain_delete_confirmed: 'Setting the domain up for deletion...' + registrant_domain_delete_confirmed_failed: 'Something went wrong.' domain_delete_confirmed_title: 'Domain deletion has been received successfully' domain_delete_confirmed_body: 'You have successfully submitted delete confirmation. You will receive registry final confirmation to email.' + registrant_domain_delete_rejected: 'Rejecting the domain deletion...' + registrant_domain_delete_rejected_failed: 'Something went wrong.' domain_delete_rejected_title: 'Domain deletion rejection has been received successfully' domain_delete_rejected_body: 'You have rejected pending domain deletion. You will receive confirmation by email.' no_permission: 'No permission' From 96d5ae579ca7fa6877e9cdc267a694bd2a4a633d Mon Sep 17 00:00:00 2001 From: Stas Date: Fri, 15 Apr 2016 13:02:49 +0300 Subject: [PATCH 12/22] 115595167-logs_migration --- app/api/repp/api.rb | 3 ++- app/controllers/epp_controller.rb | 3 ++- db/migrate/20160411140719_add_matching_column.rb | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/api/repp/api.rb b/app/api/repp/api.rb index 7a9ecd1e8..f52770920 100644 --- a/app/api/repp/api.rb +++ b/app/api/repp/api.rb @@ -49,7 +49,8 @@ module Repp response_code: status, api_user_name: current_user.try(:username), api_user_registrar: current_user.try(:registrar).try(:to_s), - ip: request.ip + ip: request.ip, + uuid: request.uuid }) end diff --git a/app/controllers/epp_controller.rb b/app/controllers/epp_controller.rb index 49be47848..d692190eb 100644 --- a/app/controllers/epp_controller.rb +++ b/app/controllers/epp_controller.rb @@ -371,7 +371,8 @@ class EppController < ApplicationController response: @response, 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), - ip: request.ip + ip: request.ip, + uuid: request.uuid }) end # rubocop: enable Metrics/CyclomaticComplexity diff --git a/db/migrate/20160411140719_add_matching_column.rb b/db/migrate/20160411140719_add_matching_column.rb index c16aef530..a1b158313 100644 --- a/db/migrate/20160411140719_add_matching_column.rb +++ b/db/migrate/20160411140719_add_matching_column.rb @@ -9,7 +9,7 @@ class AddMatchingColumn < ActiveRecord::Migration :log_zonefile_settings] tables.each do |table| - add_column table, :uuid, :text + add_column table, :uuid, :string end end From 7043097ec0cdb5aff8f02700ffee6b1a077dcec5 Mon Sep 17 00:00:00 2001 From: Stas Date: Sun, 17 Apr 2016 15:12:10 +0300 Subject: [PATCH 13/22] 117131083-timezone_precision --- app/models/domain.rb | 6 +++--- app/models/epp/domain.rb | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/models/domain.rb b/app/models/domain.rb index a2ecc5451..7d383f6c9 100644 --- a/app/models/domain.rb +++ b/app/models/domain.rb @@ -575,7 +575,7 @@ class Domain < ActiveRecord::Base statuses << DomainStatus::SERVER_MANUAL_INZONE end - self.force_delete_at = (Time.zone.now + (Setting.redemption_grace_period.days + 1.day)).beginning_of_day 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 save!(validate: false) registrar.messages.create!( @@ -604,7 +604,7 @@ class Domain < ActiveRecord::Base def set_graceful_expired self.outzone_at = valid_to + Setting.expire_warning_period.days - self.delete_at = (outzone_at + (Setting.redemption_grace_period.days + 1.day)).beginning_of_day + self.delete_at = (outzone_at + (Setting.redemption_grace_period.days + 1.day)).utc.beginning_of_day self.statuses |= [DomainStatus::EXPIRED] end @@ -612,7 +612,7 @@ class Domain < ActiveRecord::Base # TODO: currently valid_to attribute update logic is open # 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.delete_at = (Time.zone.now + (Setting.redemption_grace_period.days + 1.day)).beginning_of_day + self.delete_at = (Time.zone.now + (Setting.redemption_grace_period.days + 1.day)).utc.beginning_of_day statuses << DomainStatus::EXPIRED end diff --git a/app/models/epp/domain.rb b/app/models/epp/domain.rb index 8d102178f..69bb101f8 100644 --- a/app/models/epp/domain.rb +++ b/app/models/epp/domain.rb @@ -586,7 +586,7 @@ class Epp::Domain < Domain msg: I18n.t(:object_status_prohibits_operation) } unless pending_deletable? - self.delete_at = (Time.zone.now + (Setting.redemption_grace_period.days + 1.day)).beginning_of_day + self.delete_at = (Time.zone.now + (Setting.redemption_grace_period.days + 1.day)).utc.beginning_of_day set_pending_delete set_server_hold if server_holdable? save(validate: false) From 62d6c531802a09ff7ed6ac15396bd201bff978a1 Mon Sep 17 00:00:00 2001 From: Stas Date: Tue, 19 Apr 2016 19:38:33 +0300 Subject: [PATCH 14/22] 115595167-frame_present --- app/controllers/epp_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/epp_controller.rb b/app/controllers/epp_controller.rb index d692190eb..de1002604 100644 --- a/app/controllers/epp_controller.rb +++ b/app/controllers/epp_controller.rb @@ -361,7 +361,7 @@ class EppController < ApplicationController if request_command == 'login' && frame.present? frame.gsub!(/pw>.+<\//, 'pw>[FILTERED]]+)>([^<])+<\/eis:legalDocument>/, "[FILTERED]") + trimmed_request = frame.gsub(/]+)>([^<])+<\/eis:legalDocument>/, "[FILTERED]") if frame.present? ApiLog::EppLog.create({ request: trimmed_request, From da1228a457b646d01a8f43ea8cd14e95e9ac8d5c Mon Sep 17 00:00:00 2001 From: Stas Date: Wed, 20 Apr 2016 13:43:35 +0300 Subject: [PATCH 15/22] 115595167-extra_columns --- db/migrate/20160411140719_add_matching_column.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/db/migrate/20160411140719_add_matching_column.rb b/db/migrate/20160411140719_add_matching_column.rb index a1b158313..48be2ac39 100644 --- a/db/migrate/20160411140719_add_matching_column.rb +++ b/db/migrate/20160411140719_add_matching_column.rb @@ -11,7 +11,9 @@ class AddMatchingColumn < ActiveRecord::Migration tables.each do |table| add_column table, :uuid, :string end + + ApiLog::EppLog.connection.execute("ALTER TABLE epp_logs ADD COLUMN uuid varchar;") + ApiLog::ReppLog.connection.execute("ALTER TABLE repp_logs ADD COLUMN uuid varchar;") + end - - end From 5048b9309e22bb592af187cc01bd0d01147c144f Mon Sep 17 00:00:00 2001 From: Vladimir Krylov Date: Wed, 20 Apr 2016 14:04:54 +0300 Subject: [PATCH 16/22] Story#117991277 - allow to update country code if ident type is birthday --- app/models/epp/contact.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/models/epp/contact.rb b/app/models/epp/contact.rb index 52fef7143..ff119024d 100644 --- a/app/models/epp/contact.rb +++ b/app/models/epp/contact.rb @@ -173,6 +173,8 @@ class Epp::Contact < Contact 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_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? at.merge!(ident_type: ident_frame.attr('type')) at.merge!(ident_country_code: ident_frame.attr('cc')) if ident_frame.attr('cc').present? From 0d87f53e106b92ffeda1412af29f6aff81eb0a68 Mon Sep 17 00:00:00 2001 From: Vladimir Krylov Date: Wed, 20 Apr 2016 14:08:58 +0300 Subject: [PATCH 17/22] Story#117991277 - making commit --- app/models/epp/contact.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/epp/contact.rb b/app/models/epp/contact.rb index ff119024d..df2dabf78 100644 --- a/app/models/epp/contact.rb +++ b/app/models/epp/contact.rb @@ -173,7 +173,7 @@ class Epp::Contact < Contact 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_country_code: ident_frame.attr('cc')) if ident_frame.attr('cc').present? - elsif ident_type == "birthday" && ident_country_code.blank? + 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? at.merge!(ident_type: ident_frame.attr('type')) From c8ccac84f355ea2d84625e754d93bf7ef067828b Mon Sep 17 00:00:00 2001 From: Vladimir Krylov Date: Wed, 20 Apr 2016 14:43:55 +0300 Subject: [PATCH 18/22] Story#117991277 - validate contact with birthday cannot be Estonian --- app/models/contact.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/models/contact.rb b/app/models/contact.rb index 3e7ae4fc8..090e64866 100644 --- a/app/models/contact.rb +++ b/app/models/contact.rb @@ -81,7 +81,7 @@ class Contact < ActiveRecord::Base ORG = 'org' PRIV = 'priv' - BIRTHDAY = 'birthday' + BIRTHDAY = 'birthday'.freeze PASSPORT = 'passport' IDENT_TYPES = [ @@ -252,6 +252,8 @@ class Contact < ActiveRecord::Base if ident.size != 8 || !(ident =~/\A[0-9]{8}\z/) errors.add(:ident, err_msg) end + when BIRTHDAY + errors.add(:ident, err_msg) end end end @@ -284,6 +286,10 @@ class Contact < ActiveRecord::Base !org? end + def birthday? + ident_type == BIRTHDAY + end + def generate_auth_info return if @generate_auth_info_disabled return if auth_info.present? From 045b285b3706107a396811daa0393f7f1e92c12e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20V=C3=B5hmar?= Date: Wed, 20 Apr 2016 15:35:32 +0300 Subject: [PATCH 19/22] fixed typos in contact update e-mail messages --- app/views/mailers/contact_mailer/email_updated.html.erb | 6 +++--- app/views/mailers/contact_mailer/email_updated.text.erb | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/views/mailers/contact_mailer/email_updated.html.erb b/app/views/mailers/contact_mailer/email_updated.html.erb index cd5a75682..2c5a265e9 100644 --- a/app/views/mailers/contact_mailer/email_updated.html.erb +++ b/app/views/mailers/contact_mailer/email_updated.html.erb @@ -1,10 +1,10 @@ Tere <%= @contact.name %>

-Kontakti <%= @contact.name %> eposti aadress on muudetud
+Kontakti <%= @contact.name %> e-posti aadress on muudetud
endine aadress: <%= @old_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, seal hulgas kinnitustaotlused omanikuvahetuse ja domeeni kustutamise korral. Palun veenduge, et muudatus on korrektne ning probleemide korral pöörduge oma registripidaja poole. Teie registripidaja on <%= @contact.registrar.name %>

<% if @contact.related_domain_descriptions.present? %> Muudatusega seotud domeenid:
@@ -16,7 +16,7 @@ Muudatusega seotud domeenid:
Kontaktandmed:
Nimi: <%= @contact.name %>
Isikukood: <%= @contact.ident %>
-Epost: <%= @contact.email %>
+E-post: <%= @contact.email %>
Tel: <%= @contact.phone %>
Tänav: <%= @contact.street %>
Linn: <%= @contact.city %>
diff --git a/app/views/mailers/contact_mailer/email_updated.text.erb b/app/views/mailers/contact_mailer/email_updated.text.erb index a899c04c2..835ea2ad6 100644 --- a/app/views/mailers/contact_mailer/email_updated.text.erb +++ b/app/views/mailers/contact_mailer/email_updated.text.erb @@ -1,10 +1,10 @@ Tere <%= @contact.name %> -Kontakti <%= @contact.name %> eposti aadress on muudetud +Kontakti <%= @contact.name %> e-posti aadress on muudetud endine aadress: <%= @old_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, seal hulgas kinnitustaotlused omanikuvahetuse ja domeeni kustutamise korral. Palun veenduge, et muudatus on korrektne ning probleemide korral pöörduge oma registripidaja poole. Teie registripidaja on <%= @contact.registrar.name %> <% if @contact.related_domain_descriptions.present? %> Muudatusega seotud domeenid: @@ -16,7 +16,7 @@ Muudatusega seotud domeenid: Kontaktandmed: Nimi: <%= @contact.name %> Isikukood: <%= @contact.ident %> -Epost: <%= @contact.email %> +E-post: <%= @contact.email %> Tel: <%= @contact.phone %> Tänav: <%= @contact.street %> Linn: <%= @contact.city %> From 16de6bfaea157c5d9eed35c28370d85ff7d58748 Mon Sep 17 00:00:00 2001 From: Stas Date: Thu, 21 Apr 2016 11:03:13 +0300 Subject: [PATCH 20/22] 115595167-new_migration --- db/migrate/20160411140719_add_matching_column.rb | 4 ---- db/migrate/20160421074023_add_log_matching_column.rb | 9 +++++++++ 2 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 db/migrate/20160421074023_add_log_matching_column.rb diff --git a/db/migrate/20160411140719_add_matching_column.rb b/db/migrate/20160411140719_add_matching_column.rb index 48be2ac39..bbc15d352 100644 --- a/db/migrate/20160411140719_add_matching_column.rb +++ b/db/migrate/20160411140719_add_matching_column.rb @@ -11,9 +11,5 @@ class AddMatchingColumn < ActiveRecord::Migration tables.each do |table| add_column table, :uuid, :string end - - ApiLog::EppLog.connection.execute("ALTER TABLE epp_logs ADD COLUMN uuid varchar;") - ApiLog::ReppLog.connection.execute("ALTER TABLE repp_logs ADD COLUMN uuid varchar;") - end end diff --git a/db/migrate/20160421074023_add_log_matching_column.rb b/db/migrate/20160421074023_add_log_matching_column.rb new file mode 100644 index 000000000..6ea1931a9 --- /dev/null +++ b/db/migrate/20160421074023_add_log_matching_column.rb @@ -0,0 +1,9 @@ +class AddLogMatchingColumn < ActiveRecord::Migration + + def change + + ApiLog::EppLog.connection.execute("ALTER TABLE epp_logs ADD COLUMN uuid varchar;") + ApiLog::ReppLog.connection.execute("ALTER TABLE repp_logs ADD COLUMN uuid varchar;") + + end +end From 16f0f940c8f1ad1f6459c1f9c3a50616d54b29cf Mon Sep 17 00:00:00 2001 From: Vladimir Krylov Date: Thu, 21 Apr 2016 12:38:15 +0300 Subject: [PATCH 21/22] Story#117991277 - switch off Contact's birthday and cc=EE validation on update for now --- app/models/contact.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/contact.rb b/app/models/contact.rb index 090e64866..57174296a 100644 --- a/app/models/contact.rb +++ b/app/models/contact.rb @@ -253,7 +253,7 @@ class Contact < ActiveRecord::Base errors.add(:ident, err_msg) end when BIRTHDAY - errors.add(:ident, err_msg) + errors.add(:ident, err_msg) if id.blank? # only for create action right now. Later for all of them end end end From a5e9dde027913dfa63b41fddc9943731b6b17e5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20V=C3=B5hmar?= Date: Thu, 5 May 2016 09:13:23 +0300 Subject: [PATCH 22/22] Fixed typos in automatic emails sent to notify about a pending registrant change request --- .../pending_update_notification_for_new_registrant.html.erb | 4 ++-- .../pending_update_notification_for_new_registrant.text.erb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/mailers/domain_mailer/pending_update_notification_for_new_registrant.html.erb b/app/views/mailers/domain_mailer/pending_update_notification_for_new_registrant.html.erb index 07de23117..cbf450d9d 100644 --- a/app/views/mailers/domain_mailer/pending_update_notification_for_new_registrant.html.erb +++ b/app/views/mailers/domain_mailer/pending_update_notification_for_new_registrant.html.erb @@ -15,9 +15,9 @@ Tänav: <%= @params[:registrant_street] %>
Linn: <%= @params[:registrant_city] %>
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

diff --git a/app/views/mailers/domain_mailer/pending_update_notification_for_new_registrant.text.erb b/app/views/mailers/domain_mailer/pending_update_notification_for_new_registrant.text.erb index 24005a58a..7db6f2f93 100644 --- a/app/views/mailers/domain_mailer/pending_update_notification_for_new_registrant.text.erb +++ b/app/views/mailers/domain_mailer/pending_update_notification_for_new_registrant.text.erb @@ -15,9 +15,9 @@ Tänav: <%= @params[:registrant_street] %> Linn: <%= @params[:registrant_city] %> 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