diff options
author | Victor Zagorodny <vzagorodny@gitlab.com> | 2019-02-08 14:22:11 +0300 |
---|---|---|
committer | Victor Zagorodny <vzagorodny@gitlab.com> | 2019-02-12 13:46:31 +0300 |
commit | fa518963ec7a703ddb321533884a49c516a4acd7 (patch) | |
tree | f753e8b03c38a7962c33d6a756cf20344d8af716 /lib | |
parent | 60bd0a24f539217d760437e49e86c04e5c43498a (diff) |
Protect group overview usage ping w/ feature flag
user_preferences key is includes into system usage
data only if group_overview_security_dashboard
feature flag is enabled; see
https://gitlab.com/gitlab-org/gitlab-ee/issues/7048
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/usage_data.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/gitlab/usage_data.rb b/lib/gitlab/usage_data.rb index 4f70d6b689d..a65f4a8639c 100644 --- a/lib/gitlab/usage_data.rb +++ b/lib/gitlab/usage_data.rb @@ -93,8 +93,11 @@ module Gitlab } .merge(services_usage) .merge(approximate_counts) - .merge(user_preferences: user_preferences_usage) - } + }.tap do |data| + if Feature.enabled?(:group_overview_security_dashboard) + data[:counts][:user_preferences] = user_preferences_usage + end + end end # rubocop: enable CodeReuse/ActiveRecord |