Class: Gitlab::Audit::DeployTokenAuthor

Inherits:
NullAuthor
  • Object
show all
Defined in:
lib/gitlab/audit/deploy_token_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) ⇒ DeployTokenAuthor

Returns a new instance of DeployTokenAuthor.



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

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

Instance Method Details

#nameObject

Events that are authored by a deploy token, should be shown as authored by ‘Deploy Token` in the UI.



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

def name
  @name || _('Deploy Token')
end