diff options
author | Gabriel Mazetto <gabriel@gitlab.com> | 2015-12-24 18:58:46 -0200 |
---|---|---|
committer | Gabriel Mazetto <gabriel@gitlab.com> | 2015-12-24 19:01:30 -0200 |
commit | 1249289f89feba725109ce769e685b07cf746e4b (patch) | |
tree | 6fca6541c5667a41a36b2824fe0053e14c5e74f5 /app/controllers/profiles | |
parent | 6e3fb5024addf86d48c5723168f664d09d81a969 (diff) | |
download | gitlab-ce-1249289f89feba725109ce769e685b07cf746e4b.tar.gz |
Fixed codestyle and added 2FA documentationfeature/force-tfa
Diffstat (limited to 'app/controllers/profiles')
-rw-r--r-- | app/controllers/profiles/two_factor_auths_controller.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/profiles/two_factor_auths_controller.rb b/app/controllers/profiles/two_factor_auths_controller.rb index 4f125eb7e05..6e91d9b4ad9 100644 --- a/app/controllers/profiles/two_factor_auths_controller.rb +++ b/app/controllers/profiles/two_factor_auths_controller.rb @@ -1,13 +1,15 @@ class Profiles::TwoFactorAuthsController < Profiles::ApplicationController - skip_before_action :check_tfa_requirement + skip_before_action :check_2fa_requirement def new unless current_user.otp_secret current_user.otp_secret = User.generate_otp_secret(32) end + unless current_user.otp_grace_period_started_at && two_factor_grace_period current_user.otp_grace_period_started_at = Time.current end + current_user.save! if current_user.changed? if two_factor_grace_period_expired? |