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
Jérome Perrin
gitlab-ce
Commits
66bc758e
Commit
66bc758e
authored
May 05, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update User model for two-factor auth
parent
6fa29429
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
app/models/user.rb
app/models/user.rb
+10
-2
No files found.
app/models/user.rb
View file @
66bc758e
...
...
@@ -73,8 +73,11 @@ class User < ActiveRecord::Base
default_value_for
:hide_no_password
,
false
default_value_for
:theme_id
,
gitlab_config
.
default_theme
devise
:lockable
,
:async
,
:recoverable
,
:rememberable
,
:trackable
,
:validatable
,
:omniauthable
,
:confirmable
,
:registerable
devise
:two_factor_authenticatable
,
otp_secret_encryption_key:
File
.
read
(
Rails
.
root
.
join
(
'.secret'
)).
chomp
devise
:two_factor_backupable
devise
:lockable
,
:async
,
:recoverable
,
:rememberable
,
:trackable
,
:validatable
,
:omniauthable
,
:confirmable
,
:registerable
attr_accessor
:force_random_password
...
...
@@ -663,4 +666,9 @@ class User < ActiveRecord::Base
true
end
# Used to populate the hidden form field during Two-factor authentication
def
login
username
||
email
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