From abf736e540a96ae321a4c81a10af10838ff260e1 Mon Sep 17 00:00:00 2001 From: Stas Date: Wed, 15 Jun 2016 18:27:28 +0300 Subject: [PATCH] 115693873-initiator_catches --- app/controllers/admin/pending_deletes_controller.rb | 4 ++-- .../registrant/domain_delete_confirms_controller.rb | 4 ++-- app/jobs/domain_delete_confirm_job.rb | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/controllers/admin/pending_deletes_controller.rb b/app/controllers/admin/pending_deletes_controller.rb index 2eda703bd..1f3511e6b 100644 --- a/app/controllers/admin/pending_deletes_controller.rb +++ b/app/controllers/admin/pending_deletes_controller.rb @@ -5,7 +5,7 @@ class Admin::PendingDeletesController < AdminController def update authorize! :update, :pending - if registrant_verification.domain_registrant_delete_confirm! + if registrant_verification.domain_registrant_delete_confirm!("admin #{current_user.username}") redirect_to admin_domain_path(@domain.id), notice: t(:pending_applied) else redirect_to admin_edit_domain_path(@domain.id), alert: t(:failure) @@ -15,7 +15,7 @@ class Admin::PendingDeletesController < AdminController def destroy authorize! :destroy, :pending - if registrant_verification.domain_registrant_delete_reject! + if registrant_verification.domain_registrant_delete_reject!("admin #{current_user.username}") redirect_to admin_domain_path(@domain.id), notice: t(:pending_removed) else redirect_to admin_domain_path(@domain.id), alert: t(:failure) diff --git a/app/controllers/registrant/domain_delete_confirms_controller.rb b/app/controllers/registrant/domain_delete_confirms_controller.rb index f6f05d628..ae4d8cb5f 100644 --- a/app/controllers/registrant/domain_delete_confirms_controller.rb +++ b/app/controllers/registrant/domain_delete_confirms_controller.rb @@ -21,7 +21,7 @@ class Registrant::DomainDeleteConfirmsController < RegistrantController domain_name: @domain.name, verification_token: params[:token]) if params[:rejected] - if @registrant_verification.domain_registrant_delete_reject! + if @registrant_verification.domain_registrant_delete_reject!("email link #{current_user.username}") flash[:notice] = t(:registrant_domain_verification_rejected) redirect_to registrant_domain_delete_confirm_path(@domain.id, rejected: true) else @@ -29,7 +29,7 @@ class Registrant::DomainDeleteConfirmsController < RegistrantController return render 'show' end elsif params[:confirmed] - if @registrant_verification.domain_registrant_delete_confirm! + if @registrant_verification.domain_registrant_delete_confirm!("email link #{current_user.username}") flash[:notice] = t(:registrant_domain_verification_confirmed) redirect_to registrant_domain_delete_confirm_path(@domain.id, confirmed: true) else diff --git a/app/jobs/domain_delete_confirm_job.rb b/app/jobs/domain_delete_confirm_job.rb index fc3ed924e..c2766f22d 100644 --- a/app/jobs/domain_delete_confirm_job.rb +++ b/app/jobs/domain_delete_confirm_job.rb @@ -1,6 +1,6 @@ class DomainDeleteConfirmJob < Que::Job def run(domain_id, action, initiator = nil) - ::PaperTrail.whodunnit = "job - #{self.class.name} - #{action}" + ::PaperTrail.whodunnit = "job - #{self.class.name} - #{action} by #{initiator}" # it's recommended to keep transaction against job table as short as possible. ActiveRecord::Base.transaction do domain = Epp::Domain.find(domain_id)