Merge pull request #2351 from internetee/2349-remove-email-address-verifications

Remove email verification legacy code
This commit is contained in:
Timo Võhmar 2022-04-14 16:25:59 +03:00 committed by GitHub
commit 451c39f333
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 35 additions and 542 deletions

View file

@ -32,7 +32,6 @@ module Admin
contacts = contacts.where("ident_country_code is null or ident_country_code=''")
end
contacts = contacts.email_verification_failed if params[:email_verification_failed].eql?('1')
contacts
end

View file

@ -34,13 +34,7 @@ module Domain::ForceDelete
reason = explicit&.downcase
return reason if %w[invalid_email invalid_phone].include?(reason)
if contact_emails_verification_failed.present?
'invalid_email'
elsif registrant.org?
'legal_person'
else
'private_person'
end
registrant.org? ? 'legal_person' : 'private_person'
end
def force_delete_scheduled?

View file

@ -5,10 +5,6 @@ module EmailVerifable
scope :recently_not_validated, -> { where.not(id: ValidationEvent.validated_ids_by(name)) }
end
def email_verification_failed?
need_to_start_force_delete?
end
def validate_email_data(level:, count:)
validation_events.order(created_at: :desc).limit(count).all? do |event|
event.check_level == level.to_s && event.failed?

View file

@ -25,11 +25,6 @@ class Contact < ApplicationRecord
alias_attribute :kind, :ident_type
alias_attribute :copy_from_id, :original_id # Old attribute name; for PaperTrail
scope :email_verification_failed, lambda {
joins('LEFT JOIN email_address_verifications emv ON contacts.email = emv.email')
.where('success = false and verified_at IS NOT NULL')
}
scope :with_different_company_name, (lambda do |company|
where("ident = ? AND ident_country_code = 'EE' AND name != ?",
company.registration_number,

View file

@ -734,10 +734,6 @@ class Domain < ApplicationRecord
DNS::DomainName.new(name)
end
def contact_emails_verification_failed
contacts.select(&:email_verification_failed?)&.map(&:email)&.uniq
end
def as_csv_row
[
name,

View file

@ -52,10 +52,6 @@ class DomainPresenter
end
end
def contact_emails_verification_failed
domain.contact_emails_verification_failed.join(', ')
end
def remove_registry_lock_btn
return unless domain.locked_by_registrant?

View file

@ -63,10 +63,6 @@
.form-group
= label_tag :only_no_country_code, "Ident CC missing"
= check_box_tag :only_no_country_code, '1',params[:only_no_country_code].eql?('1'), style: 'width:auto;height:auto;float:right'
.col-md-3
.form-group
= label_tag :email_verification_failed, "Email verification failed"
= check_box_tag :email_verification_failed, '1',params[:email_verification_failed].eql?('1'), style: 'width:auto;height:auto;float:right'
.row
.col-md-3{style: 'padding-top: 25px;float:right;padding-right: 0px'}

View file

@ -1,47 +0,0 @@
<p>Lugupeetud domeeni <%= @domain.name %> registreerija/halduskontakt</p>
<p>Eesti Interneti Sihtasutusele (EIS) on saanud teatavaks, et domeeni <%= @domain.name %> kontaktandmed on puudulikud - eposti aadress <%= @domain.contact_emails_verification_failed %>.</p>
<p>Et see olukord on vastuolus .ee <a href='https://www.internet.ee/domains/ee-domain-regulation'>domeenireeglitega</a> algatas EIS <%= @delete_period_length %> päeva pikkuse kustutusmenetluse. Menetluse käigus on domeen <%= @expire_warning_period %> esimest päeva internetis kättesaadav.</p>
<p>Andmete parandamiseks pöörduge palun oma registripidaja <%= @registrar.name %> poole või isiklike ja oma ettevõtte andmete puhul <a href="https://registrant.internet.ee/">registreerija portaali</a>.</p>
<p>Kui kontaktandmed ei ole <%= @delete_period_length %> päeva jooksul parandatud, läheb domeen <%= @domain.name %> <%= @domain.force_delete_date %> domeenioksjonile <a href="https://auction.internet.ee">.ee oksjonikeskkonda</a>. Juhul kui domeenile <%= @domain.name %> ei tehta oksjonil 24h möödudes pakkumist, domeen vabaneb ja on registreerimiseks vabalt kättesaadav kõigile huvilistele. Muude võimalike oksjoni tulemuste kohta loe <a href="https://www.internet.ee/domeenid/domeenide-oksjonikeskkonna-kasutajatingimused#3-oksjonikeskkonna-enampakkumisel-osalemise-tingimused">siit</a>.</p>
<p>Lisaküsimuste korral võtke palun ühendust oma registripidajaga:</p>
<%= render 'mailers/shared/registrar/registrar.et.html', registrar: @registrar %>
<%= render 'mailers/shared/signatures/signature.et.html' %>
<hr>
<p>Dear registrant/administrative contact of .ee domain,</p>
<p>Estonian Internet Foundation has learned that contact data of the domain <%= @domain.name %> s invalid - email(s) <%= @domain.contact_emails_verification_failed %>.</p>
<p>Since this is a violation of <a href='https://www.internet.ee/domains/ee-domain-regulation'>Estonian domain regulations</a>, <%= @delete_period_length %>-day deletion process has started for the <%= @domain.name %> domain. For the first <%= @expire_warning_period %> days the domain will remain available on the Internet during the deletion process.</p>
<p>Please, contact your registrar <%= @registrar.name %> with updated contact data, or in case of your personal or business data use <a href="https://registrant.internet.ee/">.ee portal for registrants</a></p>
<p>If the data is not fixed within <%= @delete_period_length %> days, the domain <%= @domain.name %> will go to domain auction on <%= @domain.force_delete_date %> in the <a href="https://auction.internet.ee">.ee auction environment</a>. If no offer is made for the domain <%= @domain.name %> at auction within 24 hours, the domain will be released and made freely available for registration to anyone interested on a first-come, first-served basis. Read more about other potential auction results <a href="https://www.internet.ee/domains/auction-environment-user-agreement#3-terms-and-conditions-for-participation-in-the-auction-of-the-auction-environment">here</a>.</p>
<p>Should you have additional questions, please contact your registrar:</p>
<%= render 'mailers/shared/registrar/registrar.en.html', registrar: @registrar %>
<%= render 'mailers/shared/signatures/signature.en.html' %>
<hr>
<p>Уважаемый регистрант/административный контакт домена .ee</p>
<p>Целевому учреждению Eesti Internet (EIS) стало известно, что контактные данные домена <%= @registrant.reg_no %> неверны - электронная почта <%= @domain.contact_emails_verification_failed %>.</p>
<p>Так как это является нарушением <a href='https://www.internet.ee/domains/ee-domain-regulation'>Правил домена .ee</a>, <%= @delete_period_length %>-дневный процесс удаления начат для доменного имени <%= @domain.name %>. В течение первых <%= @expire_warning_period %> дней домен будет доступен в интернете.</p>
<p>Для уточнения контактных данных, пожалуйста, свяжитесь с регистратором <%= @registrar.name %>, либо воспользуйтесь <a href="https://registrant.internet.ee/">порталом для регистрантов</a></p>
<p>Если контактные данные не будут исправлены в течение <%= @delete_period_length %> дней, домен <%= @domain.name %> отправится <%= @domain.force_delete_date %> на доменный аукцион в <a href="https://auction.internet.ee">аукционной среде.ee</a>. Если в течение 24 часов в отношении домена <%= @domain.name %> е поступит предложений, домен освободится и станет доступным для всех желающих по принципу «кто раньше». О других возможных результатах аукциона читайте <a href="https://www.internet.ee/domains/auction-environment-user-agreement#3-terms-and-conditions-for-participation-in-the-auction-of-the-auction-environment">здесь</a>.</p>
<p>В случае возникновения дополнительных вопросов свяжитесь, пожалуйста, со своим регистратором:
<%= render 'mailers/shared/registrar/registrar.ru.html', registrar: @registrar %></p>
<%= render 'mailers/shared/signatures/signature.ru.html' %>

View file

@ -1,47 +0,0 @@
<p>Lugupeetud domeeni <%= @domain.name %> registreerija/halduskontakt</p>
<p>Eesti Interneti Sihtasutusele (EIS) on saanud teatavaks, et domeeni <%= @domain.name %> kontaktandmed on puudulikud - eposti aadress <%= @domain.contact_emails_verification_failed %></p>
<p>Et see olukord on vastuolus .ee <a href='https://www.internet.ee/domains/ee-domain-regulation'>domeenireeglitega</a> algatas EIS <%= @delete_period_length %> päeva pikkuse kustutusmenetluse. Menetluse käigus on domeen <%= @expire_warning_period %> esimest päeva internetis kättesaadav.</p>
<p>Andmete parandamiseks pöörduge palun oma registripidaja <%= @registrar.name %> poole või isiklike ja oma ettevõtte andmete puhul <a href="https://registrant.internet.ee/">registreerija portaali</a>.</p>
<p>Kui kontaktandmed ei ole <%= @delete_period_length %> päeva jooksul parandatud, läheb domeen <%= @domain.name %> <%= @domain.force_delete_date %> domeenioksjonile <a href="https://auction.internet.ee">.ee oksjonikeskkonda</a>. Juhul kui domeenile <%= @domain.name %> ei tehta oksjonil 24h möödudes pakkumist, domeen vabaneb ja on registreerimiseks vabalt kättesaadav kõigile huvilistele. Muude võimalike oksjoni tulemuste kohta loe <a href="https://www.internet.ee/domeenid/domeenide-oksjonikeskkonna-kasutajatingimused#3-oksjonikeskkonna-enampakkumisel-osalemise-tingimused">siit</a>.</p>
<p>Lisaküsimuste korral võtke palun ühendust oma registripidajaga:</p>
<%= render 'mailers/shared/registrar/registrar.et.html', registrar: @registrar %>
<%= render 'mailers/shared/signatures/signature.et.html' %>
<hr>
<p>Dear registrant/administrative contact of .ee domain,</p>
<p>Estonian Internet Foundation has learned that contact data of the domain <%= @domain.name %> s invalid - email(s) <%= @domain.contact_emails_verification_failed %>.</p>
<p>Since this is a violation of <a href='https://www.internet.ee/domains/ee-domain-regulation'>Estonian domain regulations</a>, <%= @delete_period_length %>-day deletion process has started for the <%= @domain.name %> domain. For the first <%= @expire_warning_period %> days the domain will remain available on the Internet during the deletion process.</p>
<p>Please, contact your registrar <%= @registrar.name %> with updated contact data, or in case of your personal or business data use <a href="https://registrant.internet.ee/">.ee portal for registrants</a></p>
<p>If the data is not fixed within <%= @delete_period_length %> days, the domain <%= @domain.name %> will go to domain auction on <%= @domain.force_delete_date %> in the <a href="https://auction.internet.ee">.ee auction environment</a>. If no offer is made for the domain <%= @domain.name %> at auction within 24 hours, the domain will be released and made freely available for registration to anyone interested on a first-come, first-served basis. Read more about other potential auction results <a href="https://www.internet.ee/domains/auction-environment-user-agreement#3-terms-and-conditions-for-participation-in-the-auction-of-the-auction-environment">here</a>.</p>
<p>Should you have additional questions, please contact your registrar:</p>
<%= render 'mailers/shared/registrar/registrar.en.html', registrar: @registrar %>
<%= render 'mailers/shared/signatures/signature.en.html' %>
<hr>
<p>Уважаемый регистрант/административный контакт домена .ee</p>
<p>Целевому учреждению Eesti Internet (EIS) стало известно, что контактные данные домена <%= @registrant.reg_no %> неверны - электронная почта <%= @domain.contact_emails_verification_failed %>.</p>
<p>Так как это является нарушением <a href='https://www.internet.ee/domains/ee-domain-regulation'>Правил домена .ee</a>, <%= @delete_period_length %>-дневный процесс удаления начат для доменного имени <%= @domain.name %>. В течение первых <%= @expire_warning_period %> дней домен будет доступен в интернете.</p>
<p>Для уточнения контактных данных, пожалуйста, свяжитесь с регистратором <%= @registrar.name %>, либо воспользуйтесь <a href="https://registrant.internet.ee/">порталом для регистрантов</a></p>
<p>Если контактные данные не будут исправлены в течение <%= @delete_period_length %> дней, домен <%= @domain.name %> отправится <%= @domain.force_delete_date %> на доменный аукцион в <a href="https://auction.internet.ee">аукционной среде.ee</a>. Если в течение 24 часов в отношении домена <%= @domain.name %> е поступит предложений, домен освободится и станет доступным для всех желающих по принципу «кто раньше». О других возможных результатах аукциона читайте <a href="https://www.internet.ee/domains/auction-environment-user-agreement#3-terms-and-conditions-for-participation-in-the-auction-of-the-auction-environment">здесь</a>.</p>
<p>В случае возникновения дополнительных вопросов свяжитесь, пожалуйста, со своим регистратором:
<%= render 'mailers/shared/registrar/registrar.ru.html', registrar: @registrar %></p>
<%= render 'mailers/shared/signatures/signature.ru.html' %>

View file

@ -0,0 +1,5 @@
class RemoveEmailAddressVerifications < ActiveRecord::Migration[6.1]
def change
# drop_table :email_address_verifications
end
end

View file

@ -0,0 +1,5 @@
class RemoveEmailAddressesValidations < ActiveRecord::Migration[6.1]
def change
# drop_table :email_addresses_validations
end
end

View file

@ -0,0 +1,5 @@
class RemoveEmailAddressesVerifications < ActiveRecord::Migration[6.1]
def change
# drop_table :email_addresses_verifications
end
end

View file

@ -51,20 +51,6 @@ CREATE EXTENSION IF NOT EXISTS hstore WITH SCHEMA public;
COMMENT ON EXTENSION hstore IS 'data type for storing sets of (key, value) pairs';
--
-- Name: pg_stat_statements; Type: EXTENSION; Schema: -; Owner: -
--
CREATE EXTENSION IF NOT EXISTS pg_stat_statements WITH SCHEMA public;
--
-- Name: EXTENSION pg_stat_statements; Type: COMMENT; Schema: -; Owner: -
--
COMMENT ON EXTENSION pg_stat_statements IS 'track execution statistics of all SQL statements executed';
--
-- Name: pgcrypto; Type: EXTENSION; Schema: -; Owner: -
--
@ -954,7 +940,6 @@ CREATE TABLE public.domains (
pending_json jsonb,
force_delete_date date,
statuses character varying[],
status_notes public.hstore,
statuses_before_force_delete character varying[] DEFAULT '{}'::character varying[],
upid integer,
up_date timestamp without time zone,
@ -962,7 +947,8 @@ CREATE TABLE public.domains (
locked_by_registrant_at timestamp without time zone,
force_delete_start timestamp without time zone,
force_delete_data public.hstore,
json_statuses_history jsonb
json_statuses_history jsonb,
status_notes public.hstore
);
@ -985,98 +971,6 @@ CREATE SEQUENCE public.domains_id_seq
ALTER SEQUENCE public.domains_id_seq OWNED BY public.domains.id;
--
-- Name: email_address_verifications; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.email_address_verifications (
id bigint NOT NULL,
email public.citext NOT NULL,
verified_at timestamp without time zone,
success boolean DEFAULT false NOT NULL,
domain public.citext NOT NULL
);
--
-- Name: email_address_verifications_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.email_address_verifications_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: email_address_verifications_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.email_address_verifications_id_seq OWNED BY public.email_address_verifications.id;
--
-- Name: email_addresses_validations; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.email_addresses_validations (
id bigint NOT NULL,
email character varying NOT NULL,
validated_at timestamp without time zone
);
--
-- Name: email_addresses_validations_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.email_addresses_validations_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: email_addresses_validations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.email_addresses_validations_id_seq OWNED BY public.email_addresses_validations.id;
--
-- Name: email_addresses_verifications; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.email_addresses_verifications (
id bigint NOT NULL,
email character varying NOT NULL,
validated_at timestamp without time zone
);
--
-- Name: email_addresses_verifications_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.email_addresses_verifications_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: email_addresses_verifications_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.email_addresses_verifications_id_seq OWNED BY public.email_addresses_verifications.id;
--
-- Name: epp_sessions; Type: TABLE; Schema: public; Owner: -
--
@ -2281,74 +2175,6 @@ CREATE SEQUENCE public.payment_orders_id_seq
ALTER SEQUENCE public.payment_orders_id_seq OWNED BY public.payment_orders.id;
--
-- Name: pghero_query_stats; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.pghero_query_stats (
id bigint NOT NULL,
database text,
"user" text,
query text,
query_hash bigint,
total_time double precision,
calls bigint,
captured_at timestamp without time zone
);
--
-- Name: pghero_query_stats_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.pghero_query_stats_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: pghero_query_stats_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.pghero_query_stats_id_seq OWNED BY public.pghero_query_stats.id;
--
-- Name: pghero_space_stats; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.pghero_space_stats (
id bigint NOT NULL,
database text,
schema text,
relation text,
size bigint,
captured_at timestamp without time zone
);
--
-- Name: pghero_space_stats_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.pghero_space_stats_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: pghero_space_stats_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.pghero_space_stats_id_seq OWNED BY public.pghero_space_stats.id;
--
-- Name: prices; Type: TABLE; Schema: public; Owner: -
--
@ -2387,48 +2213,6 @@ CREATE SEQUENCE public.prices_id_seq
ALTER SEQUENCE public.prices_id_seq OWNED BY public.prices.id;
--
-- Name: que_jobs; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.que_jobs (
priority smallint DEFAULT 100 NOT NULL,
run_at timestamp with time zone DEFAULT now() NOT NULL,
job_id bigint NOT NULL,
job_class text NOT NULL,
args json DEFAULT '[]'::json NOT NULL,
error_count integer DEFAULT 0 NOT NULL,
last_error text,
queue text DEFAULT ''::text NOT NULL
);
--
-- Name: TABLE que_jobs; Type: COMMENT; Schema: public; Owner: -
--
COMMENT ON TABLE public.que_jobs IS '3';
--
-- Name: que_jobs_job_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.que_jobs_job_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: que_jobs_job_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.que_jobs_job_id_seq OWNED BY public.que_jobs.job_id;
--
-- Name: registrant_verifications; Type: TABLE; Schema: public; Owner: -
--
@ -2709,7 +2493,8 @@ CREATE TABLE public.validation_events (
validation_eventable_type character varying,
validation_eventable_id bigint,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL
updated_at timestamp(6) without time zone NOT NULL,
event_type public.validation_type
);
@ -3013,27 +2798,6 @@ ALTER TABLE ONLY public.domain_transfers ALTER COLUMN id SET DEFAULT nextval('pu
ALTER TABLE ONLY public.domains ALTER COLUMN id SET DEFAULT nextval('public.domains_id_seq'::regclass);
--
-- Name: email_address_verifications id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.email_address_verifications ALTER COLUMN id SET DEFAULT nextval('public.email_address_verifications_id_seq'::regclass);
--
-- Name: email_addresses_validations id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.email_addresses_validations ALTER COLUMN id SET DEFAULT nextval('public.email_addresses_validations_id_seq'::regclass);
--
-- Name: email_addresses_verifications id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.email_addresses_verifications ALTER COLUMN id SET DEFAULT nextval('public.email_addresses_verifications_id_seq'::regclass);
--
-- Name: epp_sessions id; Type: DEFAULT; Schema: public; Owner: -
--
@ -3251,20 +3015,6 @@ ALTER TABLE ONLY public.notifications ALTER COLUMN id SET DEFAULT nextval('publi
ALTER TABLE ONLY public.payment_orders ALTER COLUMN id SET DEFAULT nextval('public.payment_orders_id_seq'::regclass);
--
-- Name: pghero_query_stats id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.pghero_query_stats ALTER COLUMN id SET DEFAULT nextval('public.pghero_query_stats_id_seq'::regclass);
--
-- Name: pghero_space_stats id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.pghero_space_stats ALTER COLUMN id SET DEFAULT nextval('public.pghero_space_stats_id_seq'::regclass);
--
-- Name: prices id; Type: DEFAULT; Schema: public; Owner: -
--
@ -3272,13 +3022,6 @@ ALTER TABLE ONLY public.pghero_space_stats ALTER COLUMN id SET DEFAULT nextval('
ALTER TABLE ONLY public.prices ALTER COLUMN id SET DEFAULT nextval('public.prices_id_seq'::regclass);
--
-- Name: que_jobs job_id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.que_jobs ALTER COLUMN job_id SET DEFAULT nextval('public.que_jobs_job_id_seq'::regclass);
--
-- Name: registrant_verifications id; Type: DEFAULT; Schema: public; Owner: -
--
@ -3516,30 +3259,6 @@ ALTER TABLE ONLY public.domains
ADD CONSTRAINT domains_pkey PRIMARY KEY (id);
--
-- Name: email_address_verifications email_address_verifications_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.email_address_verifications
ADD CONSTRAINT email_address_verifications_pkey PRIMARY KEY (id);
--
-- Name: email_addresses_validations email_addresses_validations_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.email_addresses_validations
ADD CONSTRAINT email_addresses_validations_pkey PRIMARY KEY (id);
--
-- Name: email_addresses_verifications email_addresses_verifications_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.email_addresses_verifications
ADD CONSTRAINT email_addresses_verifications_pkey PRIMARY KEY (id);
--
-- Name: epp_sessions epp_sessions_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
@ -3788,22 +3507,6 @@ ALTER TABLE ONLY public.payment_orders
ADD CONSTRAINT payment_orders_pkey PRIMARY KEY (id);
--
-- Name: pghero_query_stats pghero_query_stats_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.pghero_query_stats
ADD CONSTRAINT pghero_query_stats_pkey PRIMARY KEY (id);
--
-- Name: pghero_space_stats pghero_space_stats_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.pghero_space_stats
ADD CONSTRAINT pghero_space_stats_pkey PRIMARY KEY (id);
--
-- Name: prices prices_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
@ -3812,14 +3515,6 @@ ALTER TABLE ONLY public.prices
ADD CONSTRAINT prices_pkey PRIMARY KEY (id);
--
-- Name: que_jobs que_jobs_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.que_jobs
ADD CONSTRAINT que_jobs_pkey PRIMARY KEY (queue, priority, run_at, job_id);
--
-- Name: registrant_verifications registrant_verifications_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
@ -4231,13 +3926,6 @@ CREATE INDEX index_domains_on_registrar_id ON public.domains USING btree (regist
CREATE INDEX index_domains_on_statuses ON public.domains USING gin (statuses);
--
-- Name: index_email_address_verifications_on_domain; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_email_address_verifications_on_domain ON public.email_address_verifications USING btree (domain);
--
-- Name: index_epp_sessions_on_updated_at; Type: INDEX; Schema: public; Owner: -
--
@ -4574,20 +4262,6 @@ CREATE INDEX index_notifications_on_registrar_id ON public.notifications USING b
CREATE INDEX index_payment_orders_on_invoice_id ON public.payment_orders USING btree (invoice_id);
--
-- Name: index_pghero_query_stats_on_database_and_captured_at; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_pghero_query_stats_on_database_and_captured_at ON public.pghero_query_stats USING btree (database, captured_at);
--
-- Name: index_pghero_space_stats_on_database_and_captured_at; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_pghero_space_stats_on_database_and_captured_at ON public.pghero_space_stats USING btree (database, captured_at);
--
-- Name: index_prices_on_zone_id; Type: INDEX; Schema: public; Owner: -
--
@ -4644,6 +4318,13 @@ CREATE INDEX index_users_on_registrar_id ON public.users USING btree (registrar_
CREATE INDEX index_validation_events_on_event_data ON public.validation_events USING gin (event_data);
--
-- Name: index_validation_events_on_event_type; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_validation_events_on_event_type ON public.validation_events USING btree (event_type);
--
-- Name: index_validation_events_on_validation_eventable; Type: INDEX; Schema: public; Owner: -
--
@ -5389,11 +5070,9 @@ INSERT INTO "schema_migrations" (version) VALUES
('20210708131814'),
('20210729131100'),
('20210729134625'),
('20211028122103'),
('20211028125245'),
('20211029082225'),
('20210827185249'),
('20211029073644'),
('20211124071418'),
('20211124084308'),
('20211125181033'),
('20211125184334'),
('20211126085139'),
@ -5401,6 +5080,10 @@ INSERT INTO "schema_migrations" (version) VALUES
('20220106123143'),
('20220113201642'),
('20220113220809'),
('20220316140727');
('20220316140727'),
('20220406085500'),
('20220413073315'),
('20220413084536'),
('20220413084748');

View file

@ -717,52 +717,6 @@ class EppDomainUpdateBaseTest < EppTestCase
assert_no_emails
end
# COMMENT OU REASON: FOR EXPIRED DOMAIN SHOULD NOT SET FD
# def test_makes_update_if_was_forcedelete
# contact = @domain.contacts.first
# contact.update_attribute(:email, '`@outlook.test')
# contact.verify_email
# assert contact.email_verification_failed?
# @domain.reload
#
# assert @domain.force_delete_scheduled?
#
# @domain.update_attribute(:statuses_before_force_delete, nil)
#
# Setting.request_confirmation_on_registrant_change_enabled = true
# new_registrant = contacts(:william).becomes(Registrant)
# assert_not_equal new_registrant, @domain.registrant
#
# request_xml = <<-XML
# <?xml version="1.0" encoding="UTF-8" standalone="no"?>
# <epp xmlns="#{Xsd::Schema.filename(for_prefix: 'epp-ee', for_version: '1.0')}">
# <command>
# <update>
# <domain:update xmlns:domain="#{Xsd::Schema.filename(for_prefix: 'domain-ee', for_version: '1.2')}">
# <domain:name>#{@domain.name}</domain:name>
# <domain:chg>
# <domain:registrant verified="yes">#{new_registrant.code}</domain:registrant>
# </domain:chg>
# </domain:update>
# </update>
# <extension>
# <eis:extdata xmlns:eis="#{Xsd::Schema.filename(for_prefix: 'eis', for_version: '1.0')}">
# <eis:legalDocument type="pdf">#{'test' * 2000}</eis:legalDocument>
# </eis:extdata>
# </extension>
# </command>
# </epp>
# XML
#
# post epp_update_path, params: { frame: request_xml },
# headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
# @domain.reload
#
# response_xml = Nokogiri::XML(response.body)
# assert_correct_against_schema response_xml
# assert_epp_response :completed_successfully
# end
def test_clears_force_delete_when_registrar_changed
Setting.request_confirmation_on_registrant_change_enabled = true
new_registrant = contacts(:william).becomes(Registrant)

View file

@ -28,33 +28,4 @@ class DomainExpireMailerTest < ActionMailer::TestCase
assert_equal I18n.t("domain_expire_mailer.expired_soft.subject", domain_name: domain.name),
email.subject
end
# COMMENT OU REASON: FOR EXPIRED DOMAIN SHOULD NOT SET FD
# def test_delivers_domain_expiration_soft_email_if_auto_fd
# domain = domains(:shop)
# email_address = domain.registrar.email
# assert_not domain.force_delete_scheduled?
# travel_to Time.zone.parse('2010-07-05')
# email = '`@internet.ee'
#
# Truemail.configure.default_validation_type = :regex
#
# contact = domain.admin_contacts.first
# contact.update_attribute(:email, email)
# contact.verify_email
#
# assert contact.email_verification_failed?
#
# domain.reload
#
# assert_no domain.force_delete_scheduled?
#
# email = DomainExpireMailer.expired_soft(domain: domain,
# registrar: domain.registrar,
# email: email_address).deliver_now
#
# assert_emails 1
# assert_equal I18n.t("domain_expire_mailer.expired_soft.subject", domain_name: domain.name),
# email.subject
# end
end

View file

@ -137,9 +137,8 @@ class BouncedMailAddressTest < ActiveSupport::TestCase
bounced_mail = BouncedMailAddress.last
registrant = domains(:shop).registrant
registrant.verify_email(check_level: 'smtp')
assert_equal registrant.email, bounced_mail.email
assert registrant.email_verification_failed?
end
def sns_bounce_payload

View file

@ -356,7 +356,6 @@ class ForceDeleteTest < ActionMailer::TestCase
@domain.reload
assert @domain.force_delete_scheduled?
assert_equal 'invalid_email', @domain.template_name
assert_equal Date.parse('2010-09-19'), @domain.force_delete_date.to_date
assert_equal Date.parse('2010-08-05'), @domain.force_delete_start.to_date
notification = @domain.registrar.notifications.last
@ -375,7 +374,6 @@ class ForceDeleteTest < ActionMailer::TestCase
@domain.reload
assert @domain.force_delete_scheduled?
assert_equal 'invalid_email', @domain.template_name
assert_equal Date.parse('2010-09-19'), @domain.force_delete_date.to_date
assert_equal Date.parse('2010-08-05'), @domain.force_delete_start.to_date
notification = @domain.registrar.notifications.last
@ -398,12 +396,9 @@ class ForceDeleteTest < ActionMailer::TestCase
contact.verify_email
end
assert contact.email_verification_failed?
@domain.reload
assert @domain.force_delete_scheduled?
assert_equal 'invalid_email', @domain.template_name
assert_equal Date.parse('2010-09-19'), @domain.force_delete_date.to_date
assert_equal Date.parse('2010-08-05'), @domain.force_delete_start.to_date
assert_equal @domain.status_notes[DomainStatus::FORCE_DELETE], email
@ -489,7 +484,6 @@ class ForceDeleteTest < ActionMailer::TestCase
@domain.reload
assert @domain.force_delete_scheduled?
assert_equal 'invalid_email', @domain.template_name
assert_equal Date.parse('2010-09-19'), @domain.force_delete_date.to_date
assert_equal Date.parse('2010-08-05'), @domain.force_delete_start.to_date
assert @domain.status_notes[DomainStatus::FORCE_DELETE].include? email_one
@ -508,7 +502,6 @@ class ForceDeleteTest < ActionMailer::TestCase
@domain.reload
assert @domain.force_delete_scheduled?
assert_equal 'invalid_email', @domain.template_name
assert_equal Date.parse('2010-09-19'), @domain.force_delete_date.to_date
assert_equal Date.parse('2010-08-05'), @domain.force_delete_start.to_date
notification = @domain.registrar.notifications.last