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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
54ddc018
Commit
54ddc018
authored
Aug 12, 2019
by
Alex Buijs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Incorporate feedback fixes
parent
4b2c2f12
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
app/controllers/concerns/confirm_email_warning.rb
app/controllers/concerns/confirm_email_warning.rb
+1
-1
app/controllers/registrations_controller.rb
app/controllers/registrations_controller.rb
+9
-1
No files found.
app/controllers/concerns/confirm_email_warning.rb
View file @
54ddc018
...
...
@@ -10,9 +10,9 @@ module ConfirmEmailWarning
protected
def
set_confirm_warning
return
if
peek_request?
||
json_request?
||
!
request
.
get?
return
unless
current_user
return
if
current_user
.
confirmed?
return
if
peek_request?
||
json_request?
||
!
request
.
get?
email
=
current_user
.
unconfirmed_email
||
current_user
.
email
...
...
app/controllers/registrations_controller.rb
View file @
54ddc018
...
...
@@ -68,7 +68,7 @@ class RegistrationsController < Devise::RegistrationsController
def
after_sign_up_path_for
(
user
)
Gitlab
::
AppLogger
.
info
(
user_created_message
(
confirmed:
user
.
confirmed?
))
user
.
confirmed?
||
Feature
.
enabled?
(
:soft_email_confirmation
)
?
stored_location_for
(
user
)
||
dashboard_projects_path
:
users_almost_there_path
confirmed_or_unconfirmed_access_allowed
(
user
)
?
stored_location_or_dashboard
(
user
)
:
users_almost_there_path
end
def
after_inactive_sign_up_path_for
(
resource
)
...
...
@@ -134,4 +134,12 @@ class RegistrationsController < Devise::RegistrationsController
def
terms_accepted?
Gitlab
::
Utils
.
to_boolean
(
params
[
:terms_opt_in
])
end
def
confirmed_or_unconfirmed_access_allowed
(
user
)
user
.
confirmed?
||
Feature
.
enabled?
(
:soft_email_confirmation
)
end
def
stored_location_or_dashboard
(
user
)
stored_location_for
(
user
)
||
dashboard_projects_path
end
end
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