mirror of
https://github.com/internetee/registry.git
synced 2025-05-18 02:09:39 +02:00
Merge branch 'master' of github.com:domify/registry
This commit is contained in:
commit
b0296bd33e
10 changed files with 1814 additions and 878 deletions
|
@ -138,7 +138,7 @@ class EppController < ApplicationController
|
|||
# validate legal document's type here because it may be in most of the requests
|
||||
@prefix = nil
|
||||
if element_count('extdata > legalDocument') > 0
|
||||
requires_attribute('extdata > legalDocument', 'type', values: LegalDocument::TYPES)
|
||||
requires_attribute('extdata > legalDocument', 'type', values: LegalDocument::TYPES, policy: true)
|
||||
end
|
||||
|
||||
handle_errors and return if epp_errors.any?
|
||||
|
@ -188,12 +188,27 @@ class EppController < ApplicationController
|
|||
|
||||
attribute = element[attribute_selector]
|
||||
|
||||
return if attribute && options[:values].include?(attribute)
|
||||
unless attribute
|
||||
epp_errors << {
|
||||
code: '2003',
|
||||
msg: I18n.t('errors.messages.required_parameter_missing', key: attribute_selector)
|
||||
}
|
||||
return
|
||||
end
|
||||
|
||||
return if options[:values].include?(attribute)
|
||||
|
||||
if options[:policy]
|
||||
epp_errors << {
|
||||
code: '2306',
|
||||
msg: I18n.t('attribute_is_invalid', attribute: attribute_selector)
|
||||
}
|
||||
else
|
||||
epp_errors << {
|
||||
code: '2004',
|
||||
msg: I18n.t('parameter_value_range_error', key: attribute_selector)
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
def optional_attribute(element_selector, attribute_selector, options)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
= form_for([:admin, @admin_user], html: { class: 'form-horizontal' }) do |f|
|
||||
= form_for([:admin, @admin_user], html: { class: 'form-horizontal', autocomplete: 'off' }) do |f|
|
||||
= render 'shared/full_errors', object: @admin_user
|
||||
|
||||
.row
|
||||
|
@ -14,12 +14,12 @@
|
|||
- not_required = @admin_user.new_record? ? '' : 'not-required'
|
||||
= f.label :password, class: not_required
|
||||
.col-md-8
|
||||
= f.password_field(:password, class: 'form-control')
|
||||
= f.text_field(:password, class: 'form-control')
|
||||
.form-group
|
||||
.col-md-4.control-label
|
||||
= f.label :password_confirmation, class: not_required
|
||||
.col-md-8
|
||||
= f.password_field(:password_confirmation, class: 'form-control')
|
||||
= f.text_field(:password_confirmation, class: 'form-control')
|
||||
|
||||
%hr
|
||||
.form-group
|
||||
|
@ -48,7 +48,7 @@
|
|||
%hr
|
||||
.row
|
||||
.col-md-8.text-right
|
||||
= button_tag(t(:save), class: 'btn btn-primary')
|
||||
= button_tag(t(:save), class: 'btn btn-warning')
|
||||
|
||||
:coffee
|
||||
$("#admin_user_password").removeAttr('required')
|
||||
|
|
|
@ -867,3 +867,4 @@ en:
|
|||
invalid_yaml: 'Invalid YAML'
|
||||
reserved_pw: 'Reserved pw'
|
||||
no_transfers_found: 'No transfers found'
|
||||
parameter_value_range_error: 'Parameter value range error: %{key}'
|
||||
|
|
|
@ -936,8 +936,8 @@ ActiveRecord::Schema.define(version: 20150709092549) do
|
|||
|
||||
create_table "que_jobs", id: false, force: :cascade do |t|
|
||||
t.integer "priority", limit: 2, default: 100, null: false
|
||||
t.datetime "run_at", default: '2015-06-30 14:16:50', null: false
|
||||
t.integer "job_id", limit: 8, default: 0, null: false
|
||||
t.datetime "run_at", default: "now()", null: false
|
||||
t.integer "job_id", limit: 8, default: "nextval('que_jobs_job_id_seq'::regclass)", null: false
|
||||
t.text "job_class", null: false
|
||||
t.json "args", default: [], null: false
|
||||
t.integer "error_count", default: 0, null: false
|
||||
|
|
|
@ -2420,8 +2420,8 @@ ALTER SEQUENCE pricelists_id_seq OWNED BY pricelists.id;
|
|||
|
||||
CREATE TABLE que_jobs (
|
||||
priority smallint DEFAULT 100 NOT NULL,
|
||||
run_at timestamp without time zone DEFAULT '2015-06-30 14:16:50.905537'::timestamp without time zone NOT NULL,
|
||||
job_id bigint DEFAULT 0 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,
|
||||
|
@ -2430,6 +2430,32 @@ CREATE TABLE que_jobs (
|
|||
);
|
||||
|
||||
|
||||
--
|
||||
-- Name: TABLE que_jobs; Type: COMMENT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
COMMENT ON TABLE que_jobs IS '3';
|
||||
|
||||
|
||||
--
|
||||
-- Name: que_jobs_job_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE SEQUENCE 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 que_jobs_job_id_seq OWNED BY que_jobs.job_id;
|
||||
|
||||
|
||||
--
|
||||
-- Name: registrant_verifications; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
||||
--
|
||||
|
@ -3185,6 +3211,13 @@ ALTER TABLE ONLY people ALTER COLUMN id SET DEFAULT nextval('people_id_seq'::reg
|
|||
ALTER TABLE ONLY pricelists ALTER COLUMN id SET DEFAULT nextval('pricelists_id_seq'::regclass);
|
||||
|
||||
|
||||
--
|
||||
-- Name: job_id; Type: DEFAULT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY que_jobs ALTER COLUMN job_id SET DEFAULT nextval('que_jobs_job_id_seq'::regclass);
|
||||
|
||||
|
||||
--
|
||||
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
|
||||
--
|
||||
|
@ -3704,6 +3737,14 @@ ALTER TABLE ONLY pricelists
|
|||
ADD CONSTRAINT pricelists_pkey PRIMARY KEY (id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: que_jobs_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY que_jobs
|
||||
ADD CONSTRAINT que_jobs_pkey PRIMARY KEY (queue, priority, run_at, job_id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: registrant_verifications_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
||||
--
|
||||
|
@ -4808,14 +4849,26 @@ INSERT INTO schema_migrations (version) VALUES ('20150520164507');
|
|||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20150521120145');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20150522164020');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20150525075550');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20150601083516');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20150601083800');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20150603141549');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20150603211318');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20150603212659');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20150609093515');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20150609103333');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20150610111019');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20150610112238');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20150610144547');
|
||||
|
@ -4824,8 +4877,12 @@ INSERT INTO schema_migrations (version) VALUES ('20150611124920');
|
|||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20150612123111');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20150612125720');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20150701074344');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20150703084206');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20150703084632');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20150706091724');
|
||||
|
|
|
@ -16,6 +16,7 @@ Application build and update
|
|||
For production you probably would like to create databases to your locale, example:
|
||||
|
||||
create database registry_production owner registry encoding 'UTF-8' LC_COLLATE 'et_EE.utf8' LC_CTYPE 'et_EE.utf8' template template0;
|
||||
create extension hstore;
|
||||
|
||||
Deploy overview: (database schema should be loaded and seeds should be present)
|
||||
|
||||
|
|
2569
doc/epp-examples.md
2569
doc/epp-examples.md
File diff suppressed because it is too large
Load diff
|
@ -141,7 +141,7 @@ Domain name mapping protocol short version:
|
|||
|
||||
Field name Min-max Field description
|
||||
----------------------- ------- -----------------
|
||||
<transfer> 1
|
||||
<transfer> 1 Attribute: op="request/query/approve/reject/cancel"
|
||||
<domain:transfer> 1 Attribute: xmlns:domain="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/domain-eis-1.0.xsd"
|
||||
<domain:name> 1 Domain name. Can contain unicode characters.
|
||||
<domain:authInfo> 1
|
||||
|
|
|
@ -1437,8 +1437,8 @@ describe 'EPP Domain', epp: true do
|
|||
|
||||
it 'returns an error for incorrect op attribute' do
|
||||
response = epp_plain_request(domain_transfer_xml({}, 'bla'), validate_input: false)
|
||||
response[:result_code].should == '2306'
|
||||
response[:msg].should == 'Attribute is invalid: op'
|
||||
response[:msg].should == 'Parameter value range error: op'
|
||||
response[:result_code].should == '2004'
|
||||
end
|
||||
|
||||
it 'creates new pw after successful transfer' do
|
||||
|
|
|
@ -87,7 +87,8 @@ describe 'EPP Poll', epp: true do
|
|||
})
|
||||
|
||||
response = epp_plain_request(xml, validate_input: false)
|
||||
response[:msg].should == 'Attribute is invalid: op'
|
||||
response[:msg].should == 'Parameter value range error: op'
|
||||
response[:result_code].should == '2004'
|
||||
end
|
||||
|
||||
it 'dequeues multiple messages' do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue