Fail earlier if domain is non-transferable

Regardless of EPP transfer operation

#694
This commit is contained in:
Artur Beljajev 2018-02-19 02:04:39 +02:00
parent 126428f38f
commit 4ada9d1bd0
5 changed files with 44 additions and 8 deletions

View file

@ -5,6 +5,10 @@ module Concerns::Domain::Transferable
after_initialize :generate_transfer_code, if: :generate_transfer_code?
end
def non_transferable?
!transferrable?
end
def transfer(new_registrar)
old_registrar = registrar

View file

@ -644,13 +644,6 @@ class Epp::Domain < Domain
# rubocop: disable Metrics/MethodLength
# rubocop: disable Metrics/AbcSize
def query_transfer(frame, current_user)
unless transferrable?
throw :epp_error, {
code: '2304',
msg: I18n.t(:object_status_prohibits_operation)
}
end
if current_user.registrar == registrar
throw :epp_error, {
code: '2002',