Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
6fb6de12
Commit
6fb6de12
authored
Nov 05, 2020
by
Nicolas Dular
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup welcome controller
parent
b66fb18c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
10 deletions
+13
-10
app/controllers/registrations/welcome_controller.rb
app/controllers/registrations/welcome_controller.rb
+13
-10
No files found.
app/controllers/registrations/welcome_controller.rb
View file @
6fb6de12
...
...
@@ -3,7 +3,7 @@
module
Registrations
class
WelcomeController
<
ApplicationController
layout
'welcome'
skip_before_action
:authenticate_user!
,
:required_signup_info
,
:check_two_factor_requirement
skip_before_action
:authenticate_user!
,
:required_signup_info
,
:check_two_factor_requirement
,
only:
[
:show
,
:update
]
before_action
:require_current_user
feature_category
:authentication_and_authorization
...
...
@@ -16,10 +16,7 @@ module Registrations
result
=
::
Users
::
SignupService
.
new
(
current_user
,
update_params
).
execute
if
result
[
:status
]
==
:success
if
::
Gitlab
.
com?
&&
show_onboarding_issues_experiment?
track_experiment_event
(
:onboarding_issues
,
'signed_up'
)
record_experiment_user
(
:onboarding_issues
)
end
process_gitlab_com_tracking
return
redirect_to
new_users_sign_up_group_path
if
experiment_enabled?
(
:onboarding_issues
)
&&
show_onboarding_issues_experiment?
...
...
@@ -39,6 +36,14 @@ module Registrations
current_user
.
role
.
present?
&&
!
current_user
.
setup_for_company
.
nil?
end
def
process_gitlab_com_tracking
return
false
unless
::
Gitlab
.
com?
return
false
unless
show_onboarding_issues_experiment?
track_experiment_event
(
:onboarding_issues
,
'signed_up'
)
record_experiment_user
(
:onboarding_issues
)
end
def
update_params
params
.
require
(
:user
).
permit
(
:role
,
:setup_for_company
)
end
...
...
@@ -52,11 +57,9 @@ module Registrations
end
def
path_for_signed_in_user
(
user
)
if
requires_confirmation?
(
user
)
users_almost_there_path
else
stored_location_for
(
user
)
||
dashboard_projects_path
end
return
users_almost_there_path
if
requires_confirmation?
(
user
)
stored_location_for
(
user
)
||
dashboard_projects_path
end
def
show_onboarding_issues_experiment?
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment