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, #full_path

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

#impersonated?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/gitlab/audit/unauthenticated_author.rb', line 16

def impersonated?
  false
end

#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