mirror of
https://github.com/internetee/registry.git
synced 2025-07-23 11:16:00 +02:00
Keyrelay xmls
This commit is contained in:
parent
f637b3ab98
commit
f5ce88b548
4 changed files with 59 additions and 4 deletions
|
@ -1,11 +1,10 @@
|
|||
module Epp::KeyrelayHelper
|
||||
# rubocop: disable Metrics/PerceivedComplexity
|
||||
# rubocop: disable Metrics/CyclomaticComplexity
|
||||
|
||||
def keyrelay
|
||||
handle_errors and return unless validate_keyrelay_request
|
||||
|
||||
@domain = find_domain
|
||||
@domain = find_domain_for_keyrelay
|
||||
|
||||
handle_errors(@domain) and return unless @domain
|
||||
handle_errors(@domain) and return unless @domain.authenticate(parsed_frame.css('pw').text)
|
||||
|
@ -36,7 +35,7 @@ module Epp::KeyrelayHelper
|
|||
epp_errors.empty?
|
||||
end
|
||||
|
||||
def find_domain
|
||||
def find_domain_for_keyrelay
|
||||
domain_name = parsed_frame.css('name').text.strip.downcase
|
||||
domain = Epp::EppDomain.find_by(name: domain_name)
|
||||
|
||||
|
|
|
@ -11,7 +11,12 @@ module Epp::PollHelper
|
|||
if @message.attached_obj_type && @message.attached_obj_id
|
||||
@object = Object.const_get(@message.attached_obj_type).find(@message.attached_obj_id)
|
||||
end
|
||||
render 'epp/poll/poll_req'
|
||||
|
||||
if @message.attached_obj_type == 'Keyrelay'
|
||||
render 'epp/poll/poll_keyrelay'
|
||||
else
|
||||
render 'epp/poll/poll_req'
|
||||
end
|
||||
end
|
||||
|
||||
def ack_poll
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue