mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
115693873-initiator_fix
This commit is contained in:
parent
f97bab5f87
commit
dce585344e
3 changed files with 11 additions and 4 deletions
|
@ -20,8 +20,11 @@ class Registrant::DomainDeleteConfirmsController < RegistrantController
|
||||||
@registrant_verification = RegistrantVerification.new(domain_id: @domain.id,
|
@registrant_verification = RegistrantVerification.new(domain_id: @domain.id,
|
||||||
domain_name: @domain.name,
|
domain_name: @domain.name,
|
||||||
verification_token: params[:token])
|
verification_token: params[:token])
|
||||||
|
|
||||||
|
initiator = current_user ? current_user.username : t(:user_not_authorized)
|
||||||
|
|
||||||
if params[:rejected]
|
if params[:rejected]
|
||||||
if @registrant_verification.domain_registrant_delete_reject!("email link #{current_user.username}")
|
if @registrant_verification.domain_registrant_delete_reject!("email link #{initiator}")
|
||||||
flash[:notice] = t(:registrant_domain_verification_rejected)
|
flash[:notice] = t(:registrant_domain_verification_rejected)
|
||||||
redirect_to registrant_domain_delete_confirm_path(@domain.id, rejected: true)
|
redirect_to registrant_domain_delete_confirm_path(@domain.id, rejected: true)
|
||||||
else
|
else
|
||||||
|
@ -29,7 +32,7 @@ class Registrant::DomainDeleteConfirmsController < RegistrantController
|
||||||
return render 'show'
|
return render 'show'
|
||||||
end
|
end
|
||||||
elsif params[:confirmed]
|
elsif params[:confirmed]
|
||||||
if @registrant_verification.domain_registrant_delete_confirm!("email link #{current_user.username}")
|
if @registrant_verification.domain_registrant_delete_confirm!("email link #{initiator}")
|
||||||
flash[:notice] = t(:registrant_domain_verification_confirmed)
|
flash[:notice] = t(:registrant_domain_verification_confirmed)
|
||||||
redirect_to registrant_domain_delete_confirm_path(@domain.id, confirmed: true)
|
redirect_to registrant_domain_delete_confirm_path(@domain.id, confirmed: true)
|
||||||
else
|
else
|
||||||
|
|
|
@ -20,8 +20,11 @@ class Registrant::DomainUpdateConfirmsController < RegistrantController
|
||||||
@registrant_verification = RegistrantVerification.new(domain_id: @domain.id,
|
@registrant_verification = RegistrantVerification.new(domain_id: @domain.id,
|
||||||
domain_name: @domain.name,
|
domain_name: @domain.name,
|
||||||
verification_token: params[:token])
|
verification_token: params[:token])
|
||||||
|
|
||||||
|
initiator = current_user ? current_user.username : t(:user_not_authorized)
|
||||||
|
|
||||||
if params[:rejected]
|
if params[:rejected]
|
||||||
if @registrant_verification.domain_registrant_change_reject!("email link #{current_user.username}")
|
if @registrant_verification.domain_registrant_change_reject!("email link, #{initiator}")
|
||||||
flash[:notice] = t(:registrant_domain_verification_rejected)
|
flash[:notice] = t(:registrant_domain_verification_rejected)
|
||||||
redirect_to registrant_domain_update_confirm_path(@domain.id, rejected: true)
|
redirect_to registrant_domain_update_confirm_path(@domain.id, rejected: true)
|
||||||
else
|
else
|
||||||
|
@ -29,7 +32,7 @@ class Registrant::DomainUpdateConfirmsController < RegistrantController
|
||||||
return render 'show'
|
return render 'show'
|
||||||
end
|
end
|
||||||
elsif params[:confirmed]
|
elsif params[:confirmed]
|
||||||
if @registrant_verification.domain_registrant_change_confirm!("email link #{current_user.username}")
|
if @registrant_verification.domain_registrant_change_confirm!("email link, #{initiator}")
|
||||||
flash[:notice] = t(:registrant_domain_verification_confirmed)
|
flash[:notice] = t(:registrant_domain_verification_confirmed)
|
||||||
redirect_to registrant_domain_update_confirm_path(@domain.id, confirmed: true)
|
redirect_to registrant_domain_update_confirm_path(@domain.id, confirmed: true)
|
||||||
else
|
else
|
||||||
|
|
|
@ -940,3 +940,4 @@ en:
|
||||||
edit_pw: 'Edit Pw'
|
edit_pw: 'Edit Pw'
|
||||||
optional: 'Optional'
|
optional: 'Optional'
|
||||||
test_registrar: "Test registrar"
|
test_registrar: "Test registrar"
|
||||||
|
user_not_authorized: "user not authorized"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue