Class: Gitlab::Audit::UnauthenticatedAuthor

Inherits:
NullAuthor
  • Object
show all
Defined in:
lib/gitlab/audit/unauthenticated_author.rb

Instance Attribute Summary

Attributes inherited from NullAuthor

#id

Instance Method Summary collapse

Methods inherited from NullAuthor

#current_sign_in_ip, for

Constructor Details

#initialize(name: nil) ⇒ UnauthenticatedAuthor

Returns a new instance of UnauthenticatedAuthor.


6
7
8
# File 'lib/gitlab/audit/unauthenticated_author.rb', line 6

def initialize(name: nil)
  super(id: -1, name: name)
end

Instance Method Details

#nameObject

Events that are authored by unauthenticated users, should be shown as authored by `An unauthenticated user` in the UI.


12
13
14
# File 'lib/gitlab/audit/unauthenticated_author.rb', line 12

def name
  @name || _('An unauthenticated user')
end