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
Kazuhiko Shiozaki
gitlab-ce
Commits
50a2a229
Commit
50a2a229
authored
Mar 27, 2015
by
Dmitriy Zaporozhets
Committed by
Robert Speicher
May 09, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix rubocop complain
parent
cde474a4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
3 deletions
+2
-3
app/controllers/profiles/two_factor_auths_controller.rb
app/controllers/profiles/two_factor_auths_controller.rb
+0
-1
app/models/user.rb
app/models/user.rb
+1
-1
config/initializers/devise.rb
config/initializers/devise.rb
+1
-1
No files found.
app/controllers/profiles/two_factor_auths_controller.rb
View file @
50a2a229
...
...
@@ -11,7 +11,6 @@ class Profiles::TwoFactorAuthsController < ApplicationController
def
create
if
current_user
.
valid_otp?
(
params
[
:pin_code
])
current_user
.
otp_required_for_login
=
true
#current_user.otp_secret = User.generate_otp_secret
current_user
.
save!
redirect_to
profile_account_path
...
...
app/models/user.rb
View file @
50a2a229
...
...
@@ -58,7 +58,7 @@ require 'file_size_validator'
class
User
<
ActiveRecord
::
Base
devise
:two_factor_authenticatable
,
:otp_secret_encryption_key
=>
File
.
read
(
Rails
.
root
.
join
(
'.secret'
)).
chomp
otp_secret_encryption_key:
File
.
read
(
Rails
.
root
.
join
(
'.secret'
)).
chomp
include
Sortable
include
Gitlab
::
ConfigHelper
...
...
config/initializers/devise.rb
View file @
50a2a229
...
...
@@ -2,7 +2,7 @@
# four configuration values can also be set straight in your models.
Devise
.
setup
do
|
config
|
config
.
warden
do
|
manager
|
manager
.
default_strategies
(
:scope
=>
:user
).
unshift
:two_factor_authenticatable
manager
.
default_strategies
(
scope:
:user
).
unshift
:two_factor_authenticatable
end
# ==> Mailer Configuration
...
...
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