clear mini profiler cookie when admin logs off

This commit is contained in:
Sam 2016-05-18 17:27:54 +10:00
parent e3e31441b8
commit 52c3b0b0ce

View file

@ -90,6 +90,12 @@ class Auth::DefaultCurrentUserProvider
if SiteSetting.log_out_strict && (user = current_user)
user.auth_token = nil
user.save!
if user.admin && defined?(Rack::MiniProfiler)
# clear the profiling cookie to keep stuff tidy
cookies["__profilin"] = nil
end
MessageBus.publish "/logout", user.id, user_ids: [user.id]
end
cookies[TOKEN_COOKIE] = nil