diff options
Diffstat (limited to 'app/controllers/registrations')
-rw-r--r-- | app/controllers/registrations/experience_levels_controller.rb | 44 | ||||
-rw-r--r-- | app/controllers/registrations/welcome_controller.rb | 2 |
2 files changed, 1 insertions, 45 deletions
diff --git a/app/controllers/registrations/experience_levels_controller.rb b/app/controllers/registrations/experience_levels_controller.rb deleted file mode 100644 index 3c94bce126c..00000000000 --- a/app/controllers/registrations/experience_levels_controller.rb +++ /dev/null @@ -1,44 +0,0 @@ -# frozen_string_literal: true - -module Registrations - class ExperienceLevelsController < ApplicationController - layout 'minimal' - - before_action :ensure_namespace_path_param - - feature_category :onboarding - - def update - current_user.experience_level = params[:experience_level] - - if current_user.save - hide_advanced_issues - - if learn_gitlab.available? - redirect_to namespace_project_board_path(params[:namespace_path], learn_gitlab.project, learn_gitlab.board) - else - redirect_to group_path(params[:namespace_path]) - end - else - render :show - end - end - - private - - def ensure_namespace_path_param - redirect_to root_path unless params[:namespace_path].present? - end - - def hide_advanced_issues - return unless current_user.user_preference.novice? - return unless learn_gitlab.available? - - Boards::UpdateService.new(learn_gitlab.project, current_user, label_ids: [learn_gitlab.label.id]).execute(learn_gitlab.board) - end - - def learn_gitlab - @learn_gitlab ||= LearnGitlab::Project.new(current_user) - end - end -end diff --git a/app/controllers/registrations/welcome_controller.rb b/app/controllers/registrations/welcome_controller.rb index ced21b8f291..416bbf43464 100644 --- a/app/controllers/registrations/welcome_controller.rb +++ b/app/controllers/registrations/welcome_controller.rb @@ -16,7 +16,7 @@ module Registrations result = ::Users::SignupService.new(current_user, update_params).execute if result[:status] == :success - return redirect_to new_users_sign_up_group_path(trial_params) if show_signup_onboarding? + return redirect_to experiment(:combined_registration, user: current_user).redirect_path(trial_params) if show_signup_onboarding? members = current_user.members |