mirror of
https://github.com/internetee/registry.git
synced 2025-06-05 04:07:33 +02:00
keyrelay turned off, ability update
This commit is contained in:
parent
d00564f243
commit
a37f4b2e6a
8 changed files with 36 additions and 19 deletions
|
@ -1,6 +1,4 @@
|
|||
class Epp::DomainsController < EppController
|
||||
skip_authorization_check # TODO: remove it
|
||||
|
||||
before_action :find_domain, only: [:info, :renew, :update, :transfer, :delete]
|
||||
before_action :find_password, only: [:info, :update, :transfer, :delete]
|
||||
|
||||
|
@ -44,6 +42,8 @@ class Epp::DomainsController < EppController
|
|||
|
||||
# rubocop:disable Metrics/CyclomaticComplexity
|
||||
def delete
|
||||
authorize! :delete, @domain, @password
|
||||
|
||||
# all includes for bullet
|
||||
@domain = Epp::Domain.where(id: @domain.id).includes(nameservers: :versions).first
|
||||
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
class Epp::ErrorsController < EppController
|
||||
skip_authorization_check # TODO: remove it
|
||||
|
||||
def error
|
||||
epp_errors << { code: params[:code], msg: params[:msg] }
|
||||
render_epp_response '/epp/error'
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
class Epp::KeyrelaysController < EppController
|
||||
skip_authorization_check # TODO: remove it
|
||||
skip_authorization_check # TODO: move authorization under ability
|
||||
|
||||
# rubocop: disable Metrics/PerceivedComplexity
|
||||
# rubocop: disable Metrics/CyclomaticComplexity
|
||||
def keyrelay
|
||||
# keyrelay temp turned off
|
||||
@domain = find_domain
|
||||
|
||||
handle_errors(@domain) and return unless @domain
|
||||
|
@ -34,6 +35,15 @@ class Epp::KeyrelaysController < EppController
|
|||
|
||||
def find_domain
|
||||
domain_name = params[:parsed_frame].css('name').text.strip.downcase
|
||||
|
||||
# keyrelay temp turned off
|
||||
epp_errors << {
|
||||
code: '2307',
|
||||
msg: I18n.t(:unimplemented_object_service),
|
||||
value: { obj: 'name', val: domain_name }
|
||||
}
|
||||
return nil
|
||||
|
||||
domain = Epp::Domain.includes(:registrant).find_by(name: domain_name)
|
||||
|
||||
unless domain
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
class Epp::PollsController < EppController
|
||||
skip_authorization_check # TODO: remove it
|
||||
skip_authorization_check # TODO: move authorization under ability
|
||||
|
||||
def poll
|
||||
req_poll if params[:parsed_frame].css('poll').first['op'] == 'req'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue