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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/audit/auditor.rb')
-rw-r--r--lib/gitlab/audit/auditor.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/gitlab/audit/auditor.rb b/lib/gitlab/audit/auditor.rb
index fddc1f830aa..e3d2b394404 100644
--- a/lib/gitlab/audit/auditor.rb
+++ b/lib/gitlab/audit/auditor.rb
@@ -5,6 +5,10 @@ module Gitlab
class Auditor
attr_reader :scope, :name
+ PERMITTED_TARGET_CLASSES = [
+ ::Operations::FeatureFlag
+ ].freeze
+
# Record audit events
#
# @param [Hash] context
@@ -113,7 +117,11 @@ module Gitlab
end
def audit_enabled?
- authentication_event?
+ authentication_event? || permitted_target?
+ end
+
+ def permitted_target?
+ @target.class.in? PERMITTED_TARGET_CLASSES
end
def authentication_event?