Welcome to mirror list, hosted at ThFree Co, Russian Federation.

unauthenticated_author.rb « audit « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b811f9f8ad0489dd86be9f5aa439d6d6cc69cdd0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# 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

      def impersonated?
        false
      end
    end
  end
end