From a44466b0a6b5a0d382c2309716ace0b1d9fe8a62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Erik=20=C3=95unapuu?= Date: Tue, 4 Aug 2020 12:12:55 +0300 Subject: [PATCH] Provide ApiUser name as whodunnit --- app/controllers/epp/base_controller.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/controllers/epp/base_controller.rb b/app/controllers/epp/base_controller.rb index 525131cf4..e9d58a4ed 100644 --- a/app/controllers/epp/base_controller.rb +++ b/app/controllers/epp/base_controller.rb @@ -398,5 +398,9 @@ module Epp logger.error(([exception.message] + exception.backtrace).join($INPUT_RECORD_SEPARATOR)) notify_airbrake(exception) end + + def user_for_paper_trail + current_user ? current_user.id_role_username : 'anonymous' + end end end