summaryrefslogtreecommitdiffstats
path: root/app/controllers/account_controller.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2020-08-29 06:51:21 +0000
committerGo MAEDA <maeda@farend.jp>2020-08-29 06:51:21 +0000
commit8900eb6eb5994310e3f957398cc21a512c5951ab (patch)
tree22c37392fef2ef6f750dbd9bda18c90c6cfd45b9 /app/controllers/account_controller.rb
parentbe7f5e21faa05bdc483d1b58c8887ff499082073 (diff)
downloadredmine-8900eb6eb5994310e3f957398cc21a512c5951ab.tar.gz
redmine-8900eb6eb5994310e3f957398cc21a512c5951ab.zip
Backup codes for 2fa auth (#1237).
Patch by Felix Schäfer. git-svn-id: http://svn.redmine.org/redmine/trunk@19990 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/account_controller.rb')
-rw-r--r--app/controllers/account_controller.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb
index 56f29e30c..cc7ff02bb 100644
--- a/app/controllers/account_controller.rb
+++ b/app/controllers/account_controller.rb
@@ -265,6 +265,9 @@ class AccountController < ApplicationController
# set locale for the twofa user
set_localization(@user)
+ # set the requesting IP of the twofa user (e.g. for security notifications)
+ @user.remote_ip = request.remote_ip
+
@twofa = Redmine::Twofa.for_user(@user)
end