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
1 changed files with 6 additions and 0 deletions

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