diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index de54dafc5..5d051377d 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -67,7 +67,7 @@ class ApplicationController < ActionController::Base end def user_log_str(user) - user.nil? ? 'public' : user.string + user.nil? ? 'public' : user.id_role_username end def comma_support_for(parent_key, key) diff --git a/app/models/epp/domain.rb b/app/models/epp/domain.rb index 5339b8695..ec519faf5 100644 --- a/app/models/epp/domain.rb +++ b/app/models/epp/domain.rb @@ -503,7 +503,7 @@ class Epp::Domain < Domain old_registrant_email = DomainMailer.registrant_updated_notification_for_old_registrant(id, deliver_emails) preclean_pendings user = ApiUser.find(pending_json['current_user_id']) - ::PaperTrail.whodunnit = user.string # updator str should be the request originator not the approval user + ::PaperTrail.whodunnit = user.id_role_username # updator str should be the request originator not the approval user frame = Nokogiri::XML(pending_json['frame']) statuses.delete(DomainStatus::PENDING_UPDATE) yield(self) if block_given? # need to skip statuses check here diff --git a/app/models/user.rb b/app/models/user.rb index 5d415230c..b69e0250c 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -4,7 +4,7 @@ class User < ActiveRecord::Base attr_accessor :phone - def string + def id_role_username "#{self.id}-#{self.class}: #{self.username}" end