From f10c999bca2b5b37b068ff3680a6e35a6707828d Mon Sep 17 00:00:00 2001 From: James Edwards-Jones Date: Wed, 18 Apr 2018 15:03:27 +0100 Subject: Refactor OmniauthCallbacksController to remove duplication Moves LDAP to its own controller with tests Provides path forward for implementing GroupSaml --- app/controllers/concerns/authenticates_with_two_factor.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app/controllers/concerns') diff --git a/app/controllers/concerns/authenticates_with_two_factor.rb b/app/controllers/concerns/authenticates_with_two_factor.rb index 2fdf346ef44..69a053d4246 100644 --- a/app/controllers/concerns/authenticates_with_two_factor.rb +++ b/app/controllers/concerns/authenticates_with_two_factor.rb @@ -23,6 +23,9 @@ module AuthenticatesWithTwoFactor # # Returns nil def prompt_for_two_factor(user) + # Set @user for Devise views + @user = user # rubocop:disable Gitlab/ModuleWithInstanceVariables + return locked_user_redirect(user) unless user.can?(:log_in) session[:otp_user_id] = user.id -- cgit v1.2.3