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:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-08-19 12:08:42 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-08-19 12:08:42 +0300
commitb76ae638462ab0f673e5915986070518dd3f9ad3 (patch)
treebdab0533383b52873be0ec0eb4d3c66598ff8b91 /app/services/service_ping/permit_data_categories_service.rb
parent434373eabe7b4be9593d18a585fb763f1e5f1a6f (diff)
Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42
Diffstat (limited to 'app/services/service_ping/permit_data_categories_service.rb')
-rw-r--r--app/services/service_ping/permit_data_categories_service.rb20
1 files changed, 5 insertions, 15 deletions
diff --git a/app/services/service_ping/permit_data_categories_service.rb b/app/services/service_ping/permit_data_categories_service.rb
index ff48c022b56..d8fa255a485 100644
--- a/app/services/service_ping/permit_data_categories_service.rb
+++ b/app/services/service_ping/permit_data_categories_service.rb
@@ -2,10 +2,10 @@
module ServicePing
class PermitDataCategoriesService
- STANDARD_CATEGORY = 'Standard'
- SUBSCRIPTION_CATEGORY = 'Subscription'
- OPERATIONAL_CATEGORY = 'Operational'
- OPTIONAL_CATEGORY = 'Optional'
+ STANDARD_CATEGORY = 'standard'
+ SUBSCRIPTION_CATEGORY = 'subscription'
+ OPERATIONAL_CATEGORY = 'operational'
+ OPTIONAL_CATEGORY = 'optional'
CATEGORIES = [
STANDARD_CATEGORY,
SUBSCRIPTION_CATEGORY,
@@ -14,20 +14,10 @@ module ServicePing
].to_set.freeze
def execute
- return [] unless product_intelligence_enabled?
+ return [] unless ServicePingSettings.product_intelligence_enabled?
CATEGORIES
end
-
- def product_intelligence_enabled?
- pings_enabled? && !User.single_user&.requires_usage_stats_consent?
- end
-
- private
-
- def pings_enabled?
- ::Gitlab::CurrentSettings.usage_ping_enabled?
- end
end
end