Commit ef28641d authored by Grzegorz Bizon's avatar Grzegorz Bizon

Do not skip recording session destruction events

parent 98e9f52c
......@@ -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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment