diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-06-19 15:14:37 -0400 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-06-19 15:14:37 -0400 |
commit | b6318297fc93ab26108c586af9d34c16fc783589 (patch) | |
tree | 6755fcf5565a83fa7612081f902087601b69849c /app/controllers/sessions_controller.rb | |
parent | 22dd2240a6ec80955b98667c727326135a2f7f53 (diff) | |
download | gitlab-ce-b6318297fc93ab26108c586af9d34c16fc783589.tar.gz |
Use User#two_factor_enabled instead of otp_required_for_loginrs-dev-issue-2415
Diffstat (limited to 'app/controllers/sessions_controller.rb')
-rw-r--r-- | app/controllers/sessions_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb index 4d976fe6630..7577fc96d6d 100644 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb @@ -57,7 +57,7 @@ class SessionsController < Devise::SessionsController def authenticate_with_two_factor user = self.resource = find_user - return unless user && user.otp_required_for_login + return unless user && user.two_factor_enabled? if user_params[:otp_attempt].present? && session[:otp_user_id] if valid_otp_attempt?(user) |