Commit f040a63a authored by David Kim's avatar David Kim

Merge branch 'rename_license.usage_ping_method_335480' into 'master'

Rename License.usage_ping to License.customer_service_enabled

See merge request gitlab-org/gitlab!65834
parents 94c03836 63ed6908
......@@ -578,7 +578,7 @@ class License < ApplicationRecord
!!license&.cloud_licensing?
end
def usage_ping?
def customer_service_enabled?
!!license&.usage_ping_required_metrics?
end
......
......@@ -16,7 +16,7 @@ module EE
override :product_intelligence_enabled?
def product_intelligence_enabled?
::License.current&.usage_ping? || super
::License.current&.customer_service_enabled? || super
end
def filtered_usage_data(payload = raw_payload, parents = [])
......
......@@ -16,7 +16,7 @@ module EE
return [] unless product_intelligence_enabled?
optional_enabled = ::Gitlab::CurrentSettings.usage_ping_enabled?
customer_service_enabled = ::License.current.usage_ping?
customer_service_enabled = ::License.current.customer_service_enabled?
[STANDARD_CATEGORY, SUBSCRIPTION_CATEGORY].tap do |categories|
categories << OPERATIONAL_CATEGORY << OPTIONAL_CATEGORY if optional_enabled
......@@ -28,7 +28,7 @@ module EE
override :pings_enabled?
def pings_enabled?
::License.current&.usage_ping? || super
::License.current&.customer_service_enabled? || super
end
end
end
......
......@@ -1557,8 +1557,8 @@ RSpec.describe License do
end
end
describe '#usage_ping?' do
subject { license.usage_ping? }
describe '#customer_service_enabled?' do
subject { license.customer_service_enabled? }
context 'when no license provided' do
before do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment