2021-07-23 05:08:49 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module ServicePing
|
|
|
|
module ServicePingSettings
|
|
|
|
extend self
|
|
|
|
|
|
|
|
def product_intelligence_enabled?
|
2021-08-12 08:11:05 -04:00
|
|
|
enabled? && !User.single_user&.requires_usage_stats_consent?
|
2021-07-23 05:08:49 -04:00
|
|
|
end
|
|
|
|
|
2021-08-12 08:11:05 -04:00
|
|
|
def enabled?
|
2021-07-23 05:08:49 -04:00
|
|
|
::Gitlab::CurrentSettings.usage_ping_enabled?
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
ServicePing::ServicePingSettings.extend_mod_with('ServicePing::ServicePingSettings')
|