debian-mirror-gitlab/lib/service_ping/service_ping_settings.rb

18 lines
383 B
Ruby
Raw Normal View History

2021-10-27 15:23:28 +05:30
# frozen_string_literal: true
module ServicePing
module ServicePingSettings
extend self
def product_intelligence_enabled?
enabled? && !User.single_user&.requires_usage_stats_consent?
end
def enabled?
::Gitlab::CurrentSettings.usage_ping_enabled?
end
end
end
ServicePing::ServicePingSettings.extend_mod_with('ServicePing::ServicePingSettings')