Module: Gitlab::Audit::FeatureFlags

Defined in:
lib/gitlab/audit/feature_flags.rb

Class Method Summary collapse

Class Method Details

.stream_from_new_tables?(entity) ⇒ Boolean

Returns:

  • (Boolean)


6
7
8
9
10
11
12
13
14
15
16
# File 'lib/gitlab/audit/feature_flags.rb', line 6

def self.stream_from_new_tables?(entity)
  entity_scope = if entity.nil? || entity.instance_of?(::Gitlab::Audit::NullEntity)
                   :instance
                 elsif entity.instance_of?(::Gitlab::Audit::InstanceScope)
                   :instance
                 else
                   entity
                 end

  ::Feature.enabled?(:stream_audit_events_from_new_tables, entity_scope)
end