summaryrefslogtreecommitdiff
path: root/app/controllers/projects/learn_gitlab_controller.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-02-18 10:34:06 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-02-18 10:34:06 +0000
commit859a6fb938bb9ee2a317c46dfa4fcc1af49608f0 (patch)
treed7f2700abe6b4ffcb2dcfc80631b2d87d0609239 /app/controllers/projects/learn_gitlab_controller.rb
parent446d496a6d000c73a304be52587cd9bbc7493136 (diff)
downloadgitlab-ce-859a6fb938bb9ee2a317c46dfa4fcc1af49608f0.tar.gz
Add latest changes from gitlab-org/gitlab@13-9-stable-eev13.9.0-rc42
Diffstat (limited to 'app/controllers/projects/learn_gitlab_controller.rb')
-rw-r--r--app/controllers/projects/learn_gitlab_controller.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/app/controllers/projects/learn_gitlab_controller.rb b/app/controllers/projects/learn_gitlab_controller.rb
new file mode 100644
index 00000000000..162ba9bd5cb
--- /dev/null
+++ b/app/controllers/projects/learn_gitlab_controller.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+class Projects::LearnGitlabController < Projects::ApplicationController
+ before_action :authenticate_user!
+ before_action :check_experiment_enabled?
+
+ feature_category :users
+
+ def index
+ push_frontend_experiment(:learn_gitlab_a, subject: current_user)
+ push_frontend_experiment(:learn_gitlab_b, subject: current_user)
+ end
+
+ private
+
+ def check_experiment_enabled?
+ return access_denied! unless helpers.learn_gitlab_experiment_enabled?(project)
+ end
+end