diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-21 10:08:36 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-21 10:08:36 +0300 |
commit | 48aff82709769b098321c738f3444b9bdaa694c6 (patch) | |
tree | e00c7c43e2d9b603a5a6af576b1685e400410dee /lib/gitlab/gon_helper.rb | |
parent | 879f5329ee916a948223f8f43d77fba4da6cd028 (diff) |
Add latest changes from gitlab-org/gitlab@13-5-stable-eev13.5.0-rc42
Diffstat (limited to 'lib/gitlab/gon_helper.rb')
-rw-r--r-- | lib/gitlab/gon_helper.rb | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/gitlab/gon_helper.rb b/lib/gitlab/gon_helper.rb index 66517ecd743..10660649623 100644 --- a/lib/gitlab/gon_helper.rb +++ b/lib/gitlab/gon_helper.rb @@ -43,12 +43,10 @@ module Gitlab # Initialize gon.features with any flags that should be # made globally available to the frontend - push_frontend_feature_flag(:snippets_vue, default_enabled: true) - push_frontend_feature_flag(:monaco_blobs, default_enabled: true) - push_frontend_feature_flag(:monaco_ci, default_enabled: false) - push_frontend_feature_flag(:snippets_edit_vue, default_enabled: true) push_frontend_feature_flag(:webperf_experiment, default_enabled: false) push_frontend_feature_flag(:snippets_binary_blob, default_enabled: false) + push_frontend_feature_flag(:usage_data_api, default_enabled: true) + push_frontend_feature_flag(:security_auto_fix, default_enabled: false) # Startup CSS feature is a special one as it can be enabled by means of cookies and params gon.push({ features: { 'startupCss' => use_startup_css? } }, true) @@ -59,9 +57,9 @@ module Gitlab # name - The name of the feature flag, e.g. `my_feature`. # args - Any additional arguments to pass to `Feature.enabled?`. This allows # you to check if a flag is enabled for a particular user. - def push_frontend_feature_flag(name, *args) + def push_frontend_feature_flag(name, *args, **kwargs) var_name = name.to_s.camelize(:lower) - enabled = Feature.enabled?(name, *args) + enabled = Feature.enabled?(name, *args, **kwargs) # Here the `true` argument signals gon that the value should be merged # into any existing ones, instead of overwriting them. This allows you to |