mirror of
https://github.com/internetee/registry.git
synced 2025-07-30 14:36: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')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue