summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-07-23 15:13:11 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-07-23 15:13:11 +0200
commit68547bc0e0e3f85e8ac07c6f81c316e1f4456758 (patch)
tree2d7b038b56e238ae68354afecf092cb09bf8e473 /config
parent1a39d24d2034ce0d87cd5df630f1226d0beb7dd2 (diff)
downloadgitlab-ce-68547bc0e0e3f85e8ac07c6f81c316e1f4456758.tar.gz
Track blocked users and two factor authentications
Diffstat (limited to 'config')
-rw-r--r--config/initializers/warden.rb11
1 files changed, 5 insertions, 6 deletions
diff --git a/config/initializers/warden.rb b/config/initializers/warden.rb
index 3a81a9a127a..bd552e2a96b 100644
--- a/config/initializers/warden.rb
+++ b/config/initializers/warden.rb
@@ -18,17 +18,16 @@ Rails.application.configure do |config|
Warden::Manager.after_set_user(scope: :user, only: :fetch) do |user, auth, opts|
ActiveSession.set(user, auth.request)
- Gitlab::Auth::Activity.new(user, opts).user_session_fetched!
end
Warden::Manager.after_set_user(scope: :user, only: :set_user) do |user, auth, opts|
Gitlab::Auth::Activity.new(user, opts).user_session_override!
end
- Warden::Manager.before_logout(scope: :user) do |warden_user, auth, opts|
- (warden_user || auth.user).tap do |user|
- ActiveSession.destroy(user, auth.request.session.id)
- Gitlab::Auth::Activity.new(user, opts).user_signed_out!
- end
+ Warden::Manager.before_logout(scope: :user) do |user_warden, auth, opts|
+ user = user_warden || auth.user
+
+ ActiveSession.destroy(user, auth.request.session.id)
+ Gitlab::Auth::Activity.new(user, opts).user_signed_out!
end
end