2020-10-24 23:57:45 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Gitlab
|
|
|
|
module Audit
|
|
|
|
class UnauthenticatedAuthor < Gitlab::Audit::NullAuthor
|
|
|
|
def initialize(name: nil)
|
|
|
|
super(id: -1, name: name)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Events that are authored by unauthenticated users, should be
|
|
|
|
# shown as authored by `An unauthenticated user` in the UI.
|
|
|
|
def name
|
|
|
|
@name || _('An unauthenticated user')
|
|
|
|
end
|
2022-07-23 23:45:48 +05:30
|
|
|
|
|
|
|
def impersonated?
|
|
|
|
false
|
|
|
|
end
|
2020-10-24 23:57:45 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|