mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
Domain transfer improvements, various test fixes
This commit is contained in:
parent
187316078b
commit
0adca73f88
5 changed files with 44 additions and 19 deletions
|
@ -60,7 +60,7 @@ module Epp::DomainsHelper
|
|||
end
|
||||
|
||||
def transfer_domain
|
||||
@domain = find_domain
|
||||
@domain = find_domain(secure: false)
|
||||
|
||||
handle_errors(@domain) and return unless @domain
|
||||
handle_errors(@domain) and return unless @domain.transfer(domain_transfer_params)
|
||||
|
@ -128,8 +128,10 @@ module Epp::DomainsHelper
|
|||
end
|
||||
|
||||
## SHARED
|
||||
def find_domain
|
||||
domain = Domain.find_by(name: @ph[:name])
|
||||
def find_domain(secure = { secure: true })
|
||||
domain = Domain.find_by(name: @ph[:name], registrar: current_epp_user.registrar) if secure[:secure] == true
|
||||
domain = Domain.find_by(name: @ph[:name]) if secure[:secure] == false
|
||||
|
||||
unless domain
|
||||
epp_errors << { code: '2303', msg: I18n.t('errors.messages.epp_domain_not_found'), value: { obj: 'name', val: @ph[:name] } }
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue