Story: #104525314 - enable registrantChangeProhibited and enforce in Epp::Domain#update

This commit is contained in:
Matt Farnsworth 2015-10-28 19:19:51 +02:00
parent 8744f23928
commit 339885cd3d
4 changed files with 19 additions and 9 deletions

View file

@ -49,14 +49,17 @@ class Epp::DomainsController < EppController
def update
authorize! :update, @domain, @password
if @domain.update(params[:parsed_frame], current_user)
if @domain.epp_pending_update.present?
render_epp_response '/epp/domains/success_pending'
begin
if @domain.update(params[:parsed_frame], current_user)
if @domain.epp_pending_update.present?
render_epp_response '/epp/domains/success_pending'
else
render_epp_response '/epp/domains/success'
end
else
render_epp_response '/epp/domains/success'
handle_errors(@domain)
end
else
rescue
handle_errors(@domain)
end
end