Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-09-22 09:11:41 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-09-22 09:11:41 +0300
commit768ecce6106035f48356c97967f3428cbe9a59a8 (patch)
tree213192f380b05ea8d974e963d896c3bfb14ca4b2 /app/controllers
parent1e69e818f0f6d3598efb67104c39ec9408570b0f (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/concerns/onboarding/status.rb9
-rw-r--r--app/controllers/registrations/welcome_controller.rb90
2 files changed, 0 insertions, 99 deletions
diff --git a/app/controllers/concerns/onboarding/status.rb b/app/controllers/concerns/onboarding/status.rb
index 8a99f5a6c12..ea4dc550149 100644
--- a/app/controllers/concerns/onboarding/status.rb
+++ b/app/controllers/concerns/onboarding/status.rb
@@ -2,21 +2,12 @@
module Onboarding
class Status
- def self.tracking_label
- { free: 'free_registration' }
- end
-
def initialize(params, session, user)
@params = params
@session = session
@user = user
end
- # overridden in EE
- def continue_full_onboarding?
- false
- end
-
def single_invite?
# If there are more than one member it will mean we have been invited to multiple projects/groups and
# are not able to distinguish which one we should putting the user in after registration
diff --git a/app/controllers/registrations/welcome_controller.rb b/app/controllers/registrations/welcome_controller.rb
deleted file mode 100644
index bdbb7b00c40..00000000000
--- a/app/controllers/registrations/welcome_controller.rb
+++ /dev/null
@@ -1,90 +0,0 @@
-# frozen_string_literal: true
-
-module Registrations
- class WelcomeController < ApplicationController
- include OneTrustCSP
- include GoogleAnalyticsCSP
- include GoogleSyndicationCSP
- include ::Gitlab::Utils::StrongMemoize
- include Onboarding::Redirectable
-
- layout 'minimal'
- # TODO: Once this is an ee + SaaS only feature, we can remove this.
- # To be completed in https://gitlab.com/gitlab-org/gitlab/-/issues/411858
- skip_before_action :check_two_factor_requirement
-
- helper_method :welcome_update_params
- helper_method :onboarding_status
-
- feature_category :user_management
-
- def show
- return redirect_to path_for_signed_in_user if completed_welcome_step?
-
- track_event('render')
- end
-
- def update
- result = ::Users::SignupService.new(current_user, update_params).execute
-
- if result.success?
- track_event('successfully_submitted_form')
- successful_update_hooks
-
- redirect_to update_success_path
- else
- render :show
- end
- end
-
- private
-
- def authenticate_user!
- return if current_user
-
- redirect_to new_user_registration_path
- end
-
- def completed_welcome_step?
- !current_user.setup_for_company.nil?
- end
-
- def update_params
- params.require(:user).permit(:role, :setup_for_company)
- end
-
- def update_success_path
- if onboarding_status.continue_full_onboarding? # trials/regular registration on .com
- signup_onboarding_path
- elsif onboarding_status.single_invite? # invites w/o tasks due to order
- flash[:notice] = helpers.invite_accepted_notice(onboarding_status.last_invited_member)
- onboarding_status.last_invited_member_source.activity_path
- else
- # Subscription registrations goes through here as well.
- # Invites will come here too if there is more than 1.
- path_for_signed_in_user
- end
- end
-
- # overridden in EE
- def successful_update_hooks; end
-
- # overridden in EE
- def signup_onboarding_path; end
-
- # overridden in EE
- def track_event(action); end
-
- # overridden in EE
- def welcome_update_params
- {}
- end
-
- def onboarding_status
- Onboarding::Status.new(params.to_unsafe_h.deep_symbolize_keys, session, current_user)
- end
- strong_memoize_attr :onboarding_status
- end
-end
-
-Registrations::WelcomeController.prepend_mod_with('Registrations::WelcomeController')