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
51ee1b83
Commit
51ee1b83
authored
Jun 07, 2016
by
Valery Sizov
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ce_upstream' of gitlab.com:gitlab-org/gitlab-ee into ce_upstream
parents
635517a3
41b9fa92
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
21 deletions
+0
-21
app/controllers/sessions_controller.rb
app/controllers/sessions_controller.rb
+0
-21
No files found.
app/controllers/sessions_controller.rb
View file @
51ee1b83
...
...
@@ -91,27 +91,6 @@ class SessionsController < Devise::SessionsController
find_user
.
try
(
:two_factor_enabled?
)
end
def
authenticate_with_two_factor
user
=
self
.
resource
=
find_user
if
user_params
[
:otp_attempt
].
present?
&&
session
[
:otp_user_id
]
if
valid_otp_attempt?
(
user
)
# Remove any lingering user data from login
session
.
delete
(
:otp_user_id
)
remember_me
(
user
)
if
user_params
[
:remember_me
]
==
'1'
sign_in
(
user
)
and
return
else
flash
.
now
[
:alert
]
=
'Invalid two-factor code.'
render
:two_factor
and
return
end
else
if
user
&&
user
.
valid_password?
(
user_params
[
:password
])
prompt_for_two_factor
(
user
)
end
end
end
def
gitlab_geo_login
return
unless
Gitlab
::
Geo
.
secondary?
return
if
signed_in?
...
...
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