diff options
Diffstat (limited to 'app/services/audit_event_service.rb')
-rw-r--r-- | app/services/audit_event_service.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/services/audit_event_service.rb b/app/services/audit_event_service.rb index d9e40c456aa..fb309aed649 100644 --- a/app/services/audit_event_service.rb +++ b/app/services/audit_event_service.rb @@ -50,8 +50,9 @@ class AuditEventService private def build_author(author) - if author.is_a?(User) - author + case author + when User + author.impersonated? ? Gitlab::Audit::ImpersonatedAuthor.new(author) : author else Gitlab::Audit::UnauthenticatedAuthor.new(name: author) end |