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 ...@@ -578,7 +578,7 @@ class License < ApplicationRecord
!!license&.cloud_licensing? !!license&.cloud_licensing?
end end
def usage_ping? def customer_service_enabled?
!!license&.usage_ping_required_metrics? !!license&.usage_ping_required_metrics?
end end
......
...@@ -16,7 +16,7 @@ module EE ...@@ -16,7 +16,7 @@ module EE
override :product_intelligence_enabled? override :product_intelligence_enabled?
def product_intelligence_enabled? def product_intelligence_enabled?
::License.current&.usage_ping? || super ::License.current&.customer_service_enabled? || super
end end
def filtered_usage_data(payload = raw_payload, parents = []) def filtered_usage_data(payload = raw_payload, parents = [])
......
...@@ -16,7 +16,7 @@ module EE ...@@ -16,7 +16,7 @@ module EE
return [] unless product_intelligence_enabled? return [] unless product_intelligence_enabled?
optional_enabled = ::Gitlab::CurrentSettings.usage_ping_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| [STANDARD_CATEGORY, SUBSCRIPTION_CATEGORY].tap do |categories|
categories << OPERATIONAL_CATEGORY << OPTIONAL_CATEGORY if optional_enabled categories << OPERATIONAL_CATEGORY << OPTIONAL_CATEGORY if optional_enabled
...@@ -28,7 +28,7 @@ module EE ...@@ -28,7 +28,7 @@ module EE
override :pings_enabled? override :pings_enabled?
def pings_enabled? def pings_enabled?
::License.current&.usage_ping? || super ::License.current&.customer_service_enabled? || super
end end
end end
end end
......
...@@ -1557,8 +1557,8 @@ RSpec.describe License do ...@@ -1557,8 +1557,8 @@ RSpec.describe License do
end end
end end
describe '#usage_ping?' do describe '#customer_service_enabled?' do
subject { license.usage_ping? } subject { license.customer_service_enabled? }
context 'when no license provided' do context 'when no license provided' do
before 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