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,
|
||||
domain_name: @domain.name,
|
||||
verification_token: params[:token])
|
||||
|
||||
initiator = current_user ? current_user.username : t(:user_not_authorized)
|
||||
|
||||
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)
|
||||
redirect_to registrant_domain_delete_confirm_path(@domain.id, rejected: true)
|
||||
else
|
||||
|
@ -29,7 +32,7 @@ class Registrant::DomainDeleteConfirmsController < RegistrantController
|
|||
return render 'show'
|
||||
end
|
||||
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)
|
||||
redirect_to registrant_domain_delete_confirm_path(@domain.id, confirmed: true)
|
||||
else
|
||||
|
|
|
@ -20,8 +20,11 @@ class Registrant::DomainUpdateConfirmsController < RegistrantController
|
|||
@registrant_verification = RegistrantVerification.new(domain_id: @domain.id,
|
||||
domain_name: @domain.name,
|
||||
verification_token: params[:token])
|
||||
|
||||
initiator = current_user ? current_user.username : t(:user_not_authorized)
|
||||
|
||||
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)
|
||||
redirect_to registrant_domain_update_confirm_path(@domain.id, rejected: true)
|
||||
else
|
||||
|
@ -29,7 +32,7 @@ class Registrant::DomainUpdateConfirmsController < RegistrantController
|
|||
return render 'show'
|
||||
end
|
||||
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)
|
||||
redirect_to registrant_domain_update_confirm_path(@domain.id, confirmed: true)
|
||||
else
|
||||
|
|
|
@ -940,3 +940,4 @@ en:
|
|||
edit_pw: 'Edit Pw'
|
||||
optional: 'Optional'
|
||||
test_registrar: "Test registrar"
|
||||
user_not_authorized: "user not authorized"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue