diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-24 21:07:05 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-24 21:07:05 +0300 |
commit | c4edbefa458319a81e238f8f034d19f6ea6292ca (patch) | |
tree | e09a53528a8ee7b0657ed80931c6e7ceff1eccc2 /lib | |
parent | 8db8e2a34205c67e358cf544745d9eaeb30cd032 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/experimentation.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/gitlab/experimentation.rb b/lib/gitlab/experimentation.rb index 8b315ae5606..2ccc8a367aa 100644 --- a/lib/gitlab/experimentation.rb +++ b/lib/gitlab/experimentation.rb @@ -43,7 +43,7 @@ module Gitlab end def experiment_enabled?(experiment_key) - Experimentation.enabled_for_user?(experiment_key, experimentation_subject_index) + Experimentation.enabled_for_user?(experiment_key, experimentation_subject_index) || forced_enabled?(experiment_key) end def track_experiment_event(experiment_key, action) @@ -94,6 +94,10 @@ module Gitlab experiment_enabled?(experiment_key) ? 'experimental_group' : 'control_group' end + + def forced_enabled?(experiment_key) + params.has_key?(:force_experiment) && params[:force_experiment] == experiment_key.to_s + end end class << self |