diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-08-03 13:00:14 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-08-03 13:00:14 +0200 |
commit | ef28641d03acf08f286632569983f5ec2eda5871 (patch) | |
tree | c30a4c5dcc4e28af51b09dfdbd6ff5460b9ddf19 /config | |
parent | 98e9f52cf4e02562055f9106a155184e7b55012f (diff) | |
download | gitlab-ce-ef28641d03acf08f286632569983f5ec2eda5871.tar.gz |
Do not skip recording session destruction events
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/warden.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/config/initializers/warden.rb b/config/initializers/warden.rb index 632fdc59dd1..841f4aa1da9 100644 --- a/config/initializers/warden.rb +++ b/config/initializers/warden.rb @@ -30,11 +30,13 @@ Rails.application.configure do |config| end Warden::Manager.before_logout(scope: :user) do |user, auth, opts| - ActiveSession.destroy(user || auth.user, auth.request.session.id) - activity = Gitlab::Auth::Activity.new(opts) tracker = Gitlab::Auth::BlockedUserTracker.new(user, auth) + ActiveSession.destroy(user || auth.user, auth.request.session.id) + + activity.user_session_destroyed! + ## # It is possible that `before_logout` event is going to be triggered # multiple times during the request lifecycle. We want to increment @@ -51,7 +53,5 @@ Rails.application.configure do |config| activity.user_blocked! tracker.log_activity! end - - activity.user_session_destroyed! end end |