diff --git a/app/controllers/admin/base_controller.rb b/app/controllers/admin/base_controller.rb index 52ff6aa7c..fe652b2db 100644 --- a/app/controllers/admin/base_controller.rb +++ b/app/controllers/admin/base_controller.rb @@ -14,7 +14,7 @@ module Admin end def user_for_paper_trail - current_admin_user.present? ? current_admin_user.id_role_username : 'public' + current_admin_user ? current_admin_user.id_role_username : 'guest' end end end \ No newline at end of file diff --git a/app/controllers/admin/sessions_controller.rb b/app/controllers/admin/sessions_controller.rb index 1e9be9eb7..7c396845c 100644 --- a/app/controllers/admin/sessions_controller.rb +++ b/app/controllers/admin/sessions_controller.rb @@ -31,5 +31,9 @@ module Admin def after_sign_out_path_for(resource_or_scope) new_admin_user_session_path end + + def user_for_paper_trail + current_admin_user ? current_admin_user.id_role_username : 'guest' + end end end \ No newline at end of file diff --git a/app/controllers/registrar/base_controller.rb b/app/controllers/registrar/base_controller.rb index 2bd2eb492..23a5a9954 100644 --- a/app/controllers/registrar/base_controller.rb +++ b/app/controllers/registrar/base_controller.rb @@ -36,7 +36,7 @@ class Registrar end def user_for_paper_trail - current_registrar_user.present? ? current_registrar_user.id_role_username : 'public' + current_registrar_user ? current_registrar_user.id_role_username : 'guest' end end end diff --git a/app/controllers/registrar/sessions_controller.rb b/app/controllers/registrar/sessions_controller.rb index a600869f8..e1c98785b 100644 --- a/app/controllers/registrar/sessions_controller.rb +++ b/app/controllers/registrar/sessions_controller.rb @@ -178,5 +178,9 @@ class Registrar def after_sign_out_path_for(resource_or_scope) new_registrar_user_session_path end + + def user_for_paper_trail + current_registrar_user ? current_registrar_user.id_role_username : 'guest' + end end end \ No newline at end of file