mirror of
https://github.com/internetee/registry.git
synced 2025-08-01 07:26:22 +02:00
Plug in shunter gem
This commit is contained in:
parent
ded19f8083
commit
4db0ab558f
2 changed files with 9 additions and 0 deletions
|
@ -6,6 +6,9 @@ module Epp
|
|||
before_action :set_paper_trail_whodunnit
|
||||
before_action :parse_schemas_prefix_and_version
|
||||
|
||||
THROTTLED_ACTIONS = %i[info renew update transfer delete].freeze
|
||||
include Shunter::Integration::Throttle
|
||||
|
||||
def info
|
||||
authorize! :info, @domain
|
||||
|
||||
|
@ -131,6 +134,11 @@ module Epp
|
|||
|
||||
private
|
||||
|
||||
def throttled_user
|
||||
authorize!(:throttled_user, @domain) unless current_user
|
||||
current_user
|
||||
end
|
||||
|
||||
def validate_info
|
||||
@prefix = 'info > info >'
|
||||
requires('name')
|
||||
|
|
|
@ -197,6 +197,7 @@ test:
|
|||
cdns_scanner_output_file: 'test/fixtures/files/cdns_output.txt'
|
||||
dnssec_resolver_ips: 8.8.8.8, 8.8.4.4
|
||||
legal_documents_dir: 'test/fixtures/files'
|
||||
shunter_default_adapter: "Shunter::Adapters::Memory"
|
||||
|
||||
openssl_config_path: 'test/fixtures/files/test_ca/openssl.cnf'
|
||||
crl_dir: 'test/fixtures/files/test_ca/crl'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue