diff options
Diffstat (limited to 'app/controllers/otp_challenges_controller.rb')
| -rw-r--r-- | app/controllers/otp_challenges_controller.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/controllers/otp_challenges_controller.rb b/app/controllers/otp_challenges_controller.rb index eeaeac20..87586241 100644 --- a/app/controllers/otp_challenges_controller.rb +++ b/app/controllers/otp_challenges_controller.rb | |||
| @@ -28,6 +28,9 @@ class OtpChallengesController < ApplicationController | |||
| 28 | reset_session | 28 | reset_session |
| 29 | self.current_user = user | 29 | self.current_user = user |
| 30 | session[:logged_in_at] = Time.now.to_i | 30 | session[:logged_in_at] = Time.now.to_i |
| 31 | # an admin who logs in and goes straight to user management | ||
| 32 | # is already elevated | ||
| 33 | elevate! if user.is_admin? | ||
| 31 | flash[:notice] = t("flash.common.logged_in") | 34 | flash[:notice] = t("flash.common.logged_in") |
| 32 | redirect_to safe_return_to(return_to, :default => admin_path) | 35 | redirect_to safe_return_to(return_to, :default => admin_path) |
| 33 | else | 36 | else |
