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

@ -142,6 +142,13 @@ class Epp::DomainsController < EppController
authorize! :transfer, @domain, @password
action = params[:parsed_frame].css('transfer').first[:op]
if @domain.non_transferable?
throw :epp_error, {
code: '2304',
msg: I18n.t(:object_status_prohibits_operation)
}
end
@domain_transfer = @domain.transfer(params[:parsed_frame], action, current_user)
if @domain_transfer