clear mini profiler cookie when admin logs off
This commit is contained in:
parent
e3e31441b8
commit
52c3b0b0ce
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue