mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 01:11:43 +02:00
Merge remote-tracking branch 'origin/master' into 104525318-history_import
# Conflicts: # Gemfile # app/models/domain.rb
This commit is contained in:
commit
34dd6af4f7
135 changed files with 4123 additions and 814 deletions
|
@ -46,6 +46,8 @@ ca_cert_path: '/home/registry/registry/shared/ca/certs/ca.crt.pem'
|
|||
ca_key_path: '/home/registry/registry/shared/ca/private/ca.key.pem'
|
||||
ca_key_password: 'your-root-key-password'
|
||||
|
||||
directo_invoice_url: 'https://domain/ddddd.asp'
|
||||
|
||||
|
||||
#
|
||||
# EPP
|
||||
|
@ -87,6 +89,16 @@ repp_url: 'https://repp.gitlab.eu/repp/v1/'
|
|||
#
|
||||
restful_whois_url: 'https://restful-whois.example.com'
|
||||
|
||||
#
|
||||
# Estonian Business Registry
|
||||
#
|
||||
# config/secrets.yml --- arireg: {username, password}
|
||||
arireg_username: 'kasutaja'
|
||||
arireg_password: 'parool'
|
||||
# config/environments/production.rb --- Soap::Arireg.wsdl, Soap::Arireg.host
|
||||
arireg_wsdl: 'lib/schemas/testariport.wsdl' # https://demo-ariregxml.rik.ee:447/testariport/?wsdl
|
||||
#arireg_wsdl: 'lib/schemas/ariport.wsdl' # https://ariregxml.rik.ee/ariport/?wsdl
|
||||
arireg_host: 'https://demo-ariregxml.rik.ee:447' # https://ariregxml.rik.ee/
|
||||
|
||||
#
|
||||
# REGISTRAR AND REGISTRANT
|
||||
|
|
|
@ -7,6 +7,8 @@ require 'action_controller/railtie'
|
|||
require 'action_mailer/railtie'
|
||||
require 'action_view/railtie'
|
||||
require 'sprockets/railtie'
|
||||
require 'csv'
|
||||
require 'rails/all'
|
||||
# require "rails/test_unit/railtie"
|
||||
|
||||
# Require the gems listed in Gemfile, including any gems
|
||||
|
|
|
@ -70,7 +70,7 @@ Rails.application.configure do
|
|||
config.i18n.fallbacks = true
|
||||
|
||||
# Send deprecation notices to registered listeners.
|
||||
config.active_support.deprecation = :notify
|
||||
config.active_support.deprecation = :log
|
||||
|
||||
# Disable automatic flushing of the log to improve performance.
|
||||
# config.autoflush_log = false
|
||||
|
|
|
@ -70,7 +70,7 @@ Rails.application.configure do
|
|||
config.i18n.fallbacks = true
|
||||
|
||||
# Send deprecation notices to registered listeners.
|
||||
config.active_support.deprecation = :notify
|
||||
config.active_support.deprecation = :log
|
||||
|
||||
# Disable automatic flushing of the log to improve performance.
|
||||
# config.autoflush_log = false
|
||||
|
|
40
config/initializers/eis_ransack.rb
Normal file
40
config/initializers/eis_ransack.rb
Normal file
|
@ -0,0 +1,40 @@
|
|||
# A custom initializer that enables sorting via custom scopes in Ransack (like the same feature in MetaSearch)
|
||||
|
||||
module Ransack
|
||||
module Adapters
|
||||
module ActiveRecord
|
||||
class Context < ::Ransack::Context
|
||||
|
||||
# Allows for sorting by custom scopes
|
||||
#
|
||||
#
|
||||
# Define your custom scopes in your model, e. g. sort_by_title_asc and sort_by_title_desc
|
||||
# (The scopes would sort by some calculated column or a column added via some crazy join, etc.)
|
||||
#
|
||||
# In your sort links refer to the scopes like to standard fields, e. g.
|
||||
# <%= sort_link(@q, :title, 'Crazy calculated title') %>
|
||||
def evaluate(search, opts = {})
|
||||
viz = Visitor.new
|
||||
relation = @object.where(viz.accept(search.base))
|
||||
if search.sorts.any?
|
||||
custom_scopes = search.sorts.select do |s|
|
||||
custom_scope_name = :"sort_by_#{s.name}_#{s.dir}"
|
||||
relation.respond_to?(custom_scope_name)
|
||||
end
|
||||
attribute_scopes = search.sorts - custom_scopes
|
||||
|
||||
relation = relation.except(:order)
|
||||
|
||||
custom_scopes.each do |s|
|
||||
custom_scope_name = :"sort_by_#{s.name}_#{s.dir}"
|
||||
relation = relation.public_send(custom_scope_name)
|
||||
end
|
||||
|
||||
relation = relation.reorder(viz.accept(attribute_scopes)) if attribute_scopes.any?
|
||||
end
|
||||
opts[:distinct] ? relation.distinct : relation
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -28,15 +28,21 @@ if con.present? && con.table_exists?('settings')
|
|||
|
||||
Setting.save_default(:client_side_status_editing_enabled, false)
|
||||
|
||||
Setting.save_default(:days_to_keep_business_registry_cache, 2)
|
||||
|
||||
Setting.save_default(:invoice_number_min, 131050)
|
||||
Setting.save_default(:invoice_number_max, 149999)
|
||||
Setting.save_default(:days_to_keep_invoices_active, 30)
|
||||
Setting.save_default(:days_to_keep_overdue_invoices_active, 30)
|
||||
Setting.save_default(:minimum_deposit, 0.0)
|
||||
Setting.save_default(:directo_receipt_payment_term, "R")
|
||||
Setting.save_default(:directo_receipt_product_name, "ETTEM06")
|
||||
Setting.save_default(:directo_sales_agent, "JAANA")
|
||||
|
||||
Setting.save_default(:days_to_renew_domain_before_expire, 90)
|
||||
Setting.save_default(:expire_warning_period, 15)
|
||||
Setting.save_default(:redemption_grace_period, 30)
|
||||
Setting.save_default(:expiration_reminder_mail, 2)
|
||||
|
||||
Setting.save_default(:registrar_ip_whitelist_enabled, true)
|
||||
Setting.save_default(:api_ip_whitelist_enabled, true)
|
||||
|
|
|
@ -49,6 +49,7 @@ en:
|
|||
ident:
|
||||
blank: "Required parameter missing - ident"
|
||||
invalid_EE_identity_format: "Ident not in valid Estonian identity format."
|
||||
invalid_EE_identity_format_update: "Ident not in valid Estonian identity format. Please create new contact"
|
||||
invalid_birthday_format: "Ident not in valid birthady format, should be YYYY-MM-DD"
|
||||
invalid_country_code: "Ident country code is not valid, should be in ISO_3166-1 alpha 2 format"
|
||||
domains:
|
||||
|
@ -280,6 +281,7 @@ en:
|
|||
domain_details: 'Domain details'
|
||||
registered_at: 'Registered at'
|
||||
password: 'Password'
|
||||
authinfo_pw: 'AuthInfo pw'
|
||||
valid_from: 'Valid from'
|
||||
general: 'General'
|
||||
contacts: 'Contacts'
|
||||
|
@ -351,6 +353,8 @@ en:
|
|||
status: 'Status'
|
||||
eedirekt: 'EEDirekt'
|
||||
contact: 'Contact'
|
||||
credit_balance: 'Credit balance'
|
||||
starting_balance: 'Starting balance'
|
||||
|
||||
domain_transfer_requested: 'Domain transfer requested!'
|
||||
domain_transfer_approved: 'Domain transfer approved!'
|
||||
|
@ -533,6 +537,7 @@ en:
|
|||
switch_to: Switch to
|
||||
admin_menu: Admin
|
||||
domain_transfer_was_approved: 'Domain transfer was approved, associated contacts were: %{contacts} and registrant was %{registrant}'
|
||||
business_registry_service_not_available: "Business Registry service Ärireg is not available"
|
||||
|
||||
# DEPP
|
||||
activemodel:
|
||||
|
@ -554,6 +559,7 @@ en:
|
|||
|
||||
username: 'Username'
|
||||
password: 'Password'
|
||||
authinfo_pw: 'AuthInfo pw'
|
||||
log_in: 'Log in'
|
||||
domains: 'Domains'
|
||||
register: 'Register'
|
||||
|
@ -904,7 +910,7 @@ en:
|
|||
edit_zone: 'Edit zone'
|
||||
there_are_count_domains_in_this_zone: 'There are %{count} domains in this zone'
|
||||
poll_pending_update_confirmed_by_registrant: 'Registrant confirmed domain update'
|
||||
poll_pending_update_rejected_by_registranti: 'Registrant rejected domain update'
|
||||
poll_pending_update_rejected_by_registrant: 'Registrant rejected domain update'
|
||||
poll_pending_delete_rejected_by_registrant: 'Registrant rejected domain deletion'
|
||||
poll_pending_delete_confirmed_by_registrant: 'Registrant confirmed domain deletion'
|
||||
manage: Manage
|
||||
|
@ -926,3 +932,8 @@ en:
|
|||
if_auth_info_is_left_empty_it_will_be_auto_generated: 'If auth info is left empty, it will be auto generated.'
|
||||
each_domain_name_must_end_with_colon_sign: 'Each domain name must end with colon (:) sign.'
|
||||
expiration_remind_subject: 'The %{name} domain has expired'
|
||||
contact_already_associated_with_the_domain: 'Object association prohibits operation, contact already associated with the domain'
|
||||
add_reserved_domain: 'Add domain to reserved list'
|
||||
add_blocked_domain: 'Add domain to blocked list'
|
||||
edit_pw: 'Edit Pw'
|
||||
optional: 'Optional'
|
||||
|
|
|
@ -103,6 +103,12 @@ Rails.application.routes.draw do
|
|||
namespace :registrant do
|
||||
root 'domains#index'
|
||||
|
||||
resources :domains do
|
||||
collection do
|
||||
get :download_list
|
||||
end
|
||||
end
|
||||
|
||||
# resources :invoices do
|
||||
# member do
|
||||
# get 'download_pdf'
|
||||
|
@ -141,6 +147,17 @@ Rails.application.routes.draw do
|
|||
end
|
||||
end
|
||||
|
||||
resources :registrars do
|
||||
resources :api_users
|
||||
resources :white_ips
|
||||
collection do
|
||||
get :search
|
||||
end
|
||||
end
|
||||
|
||||
resources :registrants
|
||||
resources :contacts
|
||||
|
||||
resources :whois
|
||||
# resources :contacts do
|
||||
# member do
|
||||
|
@ -204,8 +221,16 @@ Rails.application.routes.draw do
|
|||
|
||||
resources :settings
|
||||
|
||||
resources :blocked_domains
|
||||
resources :reserved_domains
|
||||
resources :blocked_domains do
|
||||
member do
|
||||
get 'delete'
|
||||
end
|
||||
end
|
||||
resources :reserved_domains do
|
||||
member do
|
||||
get 'delete'
|
||||
end
|
||||
end
|
||||
|
||||
resources :registrars do
|
||||
resources :api_users
|
||||
|
|
|
@ -31,7 +31,7 @@ if @cron_group == 'registry'
|
|||
# end
|
||||
|
||||
every :day, at: '12:20am' do
|
||||
runner 'Domain.clean_expired_pendings'
|
||||
runner 'DomainCron.clean_expired_pendings'
|
||||
end
|
||||
|
||||
every 3.hours do
|
||||
|
@ -39,20 +39,24 @@ if @cron_group == 'registry'
|
|||
end
|
||||
|
||||
every 42.minutes do
|
||||
runner 'Domain.destroy_delete_candidates'
|
||||
runner 'DomainCron.destroy_delete_candidates'
|
||||
end
|
||||
|
||||
every 45.minutes do
|
||||
runner 'Domain.start_expire_period'
|
||||
runner 'DomainCron.start_expire_period'
|
||||
end
|
||||
|
||||
every 50.minutes do
|
||||
runner 'Domain.start_delete_period'
|
||||
runner 'DomainCron.start_delete_period'
|
||||
end
|
||||
|
||||
every 52.minutes do
|
||||
runner 'Domain.start_redemption_grace_period'
|
||||
runner 'DomainCron.start_redemption_grace_period'
|
||||
end
|
||||
|
||||
every :day, at: '19:00pm' do
|
||||
runner 'Directo.send_receipts'
|
||||
end if @environment == 'production'
|
||||
end
|
||||
|
||||
every 10.minutes do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue