diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-20 12:40:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-20 12:40:42 +0300 |
commit | ee664acb356f8123f4f6b00b73c1e1cf0866c7fb (patch) | |
tree | f8479f94a28f66654c6a4f6fb99bad6b4e86a40e /app/controllers/registrations | |
parent | 62f7d5c5b69180e82ae8196b7b429eeffc8e7b4f (diff) |
Add latest changes from gitlab-org/gitlab@15-5-stable-eev15.5.0-rc42
Diffstat (limited to 'app/controllers/registrations')
-rw-r--r-- | app/controllers/registrations/welcome_controller.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/controllers/registrations/welcome_controller.rb b/app/controllers/registrations/welcome_controller.rb index 4e18e6a3b20..a49b82319da 100644 --- a/app/controllers/registrations/welcome_controller.rb +++ b/app/controllers/registrations/welcome_controller.rb @@ -4,6 +4,7 @@ module Registrations class WelcomeController < ApplicationController include OneTrustCSP include GoogleAnalyticsCSP + include RegistrationsTracking layout 'minimal' skip_before_action :authenticate_user!, :required_signup_info, :check_two_factor_requirement, only: [:show, :update] @@ -25,7 +26,7 @@ module Registrations members = current_user.members - if members.count == 1 && members.last.source.present? + if registering_from_invite?(members) redirect_to members_activity_path(members), notice: helpers.invite_accepted_notice(members.last) else redirect_to path_for_signed_in_user(current_user) @@ -37,6 +38,10 @@ module Registrations private + def registering_from_invite?(members) + members.count == 1 && members.last.source.present? + end + def require_current_user return redirect_to new_user_registration_path unless current_user end |