diff options
Diffstat (limited to 'lib/service_ping/permit_data_categories.rb')
-rw-r--r-- | lib/service_ping/permit_data_categories.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/service_ping/permit_data_categories.rb b/lib/service_ping/permit_data_categories.rb new file mode 100644 index 00000000000..51eec0808cb --- /dev/null +++ b/lib/service_ping/permit_data_categories.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true + +module ServicePing + class PermitDataCategories + STANDARD_CATEGORY = 'standard' + SUBSCRIPTION_CATEGORY = 'subscription' + OPERATIONAL_CATEGORY = 'operational' + OPTIONAL_CATEGORY = 'optional' + CATEGORIES = [ + STANDARD_CATEGORY, + SUBSCRIPTION_CATEGORY, + OPERATIONAL_CATEGORY, + OPTIONAL_CATEGORY + ].to_set.freeze + + def execute + return [] unless ServicePingSettings.product_intelligence_enabled? + + CATEGORIES + end + end +end + +ServicePing::PermitDataCategories.prepend_mod_with('ServicePing::PermitDataCategories') |