Commit e73aaf45 authored by Sean McGivern's avatar Sean McGivern

Record EE without a license as its own edition in usage ping

Previously, these were those with edition: EE, and without a licensee (or
license_expires_at, or other license field). It's easier if we can just group
them together in the edition field properly.
parent c51afd6b
---
title: Record EE instances without a license correctly in usage ping
merge_request:
author:
type: fixed
...@@ -30,8 +30,9 @@ module Gitlab ...@@ -30,8 +30,9 @@ module Gitlab
license = ::License.current license = ::License.current
usage_data[:edition] = license_edition(license)
if license if license
usage_data[:edition] = license_edition(license.plan)
usage_data[:license_md5] = license.md5 usage_data[:license_md5] = license.md5
usage_data[:historical_max_users] = ::HistoricalData.max_historical_user_count usage_data[:historical_max_users] = ::HistoricalData.max_historical_user_count
usage_data[:licensee] = license.licensee usage_data[:licensee] = license.licensee
...@@ -138,8 +139,10 @@ module Gitlab ...@@ -138,8 +139,10 @@ module Gitlab
} }
end end
def license_edition(plan) def license_edition(license)
case plan return 'EE Free' unless license
case license.plan
when 'ultimate' when 'ultimate'
'EEU' 'EEU'
when 'premium' when 'premium'
......
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