mirror of
https://github.com/internetee/registry.git
synced 2025-07-20 01:36:02 +02:00
Archive: show event authors username for clients
This commit is contained in:
parent
871e289973
commit
bb6afc7e87
3 changed files with 16 additions and 4 deletions
|
@ -10,4 +10,16 @@ module WhodunnitHelper
|
|||
rescue ActiveRecord::RecordNotFound
|
||||
return nil
|
||||
end
|
||||
|
||||
def whodunnit_with_protocol(whodunnit)
|
||||
return nil unless whodunnit
|
||||
if whodunnit.include?('-EppUser')
|
||||
user = EppUser.find(whodunnit)
|
||||
return "#{user.username} (EPP)"
|
||||
end
|
||||
user = User.find(whodunnit)
|
||||
return user.username
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
return nil
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue