diff options
author | Timothy Andrew <mail@timothyandrew.net> | 2016-06-06 10:08:42 +0530 |
---|---|---|
committer | Timothy Andrew <mail@timothyandrew.net> | 2016-06-06 12:50:31 +0530 |
commit | 791cc9138be6ea1783e3c3853370cf0290f4d41e (patch) | |
tree | 827023466659a45d83edc93e8410e1251f69ade6 /lib | |
parent | fc809d689a03e69c581c1bb8ed0cf246953a7c08 (diff) | |
download | gitlab-ce-791cc9138be6ea1783e3c3853370cf0290f4d41e.tar.gz |
Add a `U2fRegistrations` table/model.
- To hold registrations from U2F devices, and to authenticate them.
- Previously, `User#two_factor_enabled` was aliased to the
`otp_required_for_login` column on `users`.
- This commit changes things a bit:
- `User#two_factor_enabled` is not a method anymore
- `User#two_factor_enabled?` checks both the
`otp_required_for_login` column, as well as `U2fRegistration`s
- Change all instances of `User#two_factor_enabled` to
`User#two_factor_enabled?`
- Add the `u2f` gem, and implement registration/authentication at the
model level.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/entities.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 1a996846e9d..66c138eb902 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -30,7 +30,7 @@ module API expose :identities, using: Entities::Identity expose :can_create_group?, as: :can_create_group expose :can_create_project?, as: :can_create_project - expose :two_factor_enabled + expose :two_factor_enabled?, as: :two_factor_enabled expose :external end |