mirror of
https://github.com/discourse/discourse.git
synced 2025-03-20 04:55:31 +08:00
FIX: do not request refresh on 'log out all' request
This commit is contained in:
parent
30c491500a
commit
2f6ce29736
@ -1224,12 +1224,12 @@ class UsersController < ApplicationController
|
|||||||
# The user should not be able to revoke the auth token of current session.
|
# The user should not be able to revoke the auth token of current session.
|
||||||
raise Discourse::InvalidParameters.new(:token_id) if guardian.auth_token == token.auth_token
|
raise Discourse::InvalidParameters.new(:token_id) if guardian.auth_token == token.auth_token
|
||||||
UserAuthToken.where(id: params[:token_id], user_id: user.id).each(&:destroy!)
|
UserAuthToken.where(id: params[:token_id], user_id: user.id).each(&:destroy!)
|
||||||
|
|
||||||
|
MessageBus.publish "/file-change", ["refresh"], user_ids: [user.id]
|
||||||
else
|
else
|
||||||
UserAuthToken.where(user_id: user.id).each(&:destroy!)
|
UserAuthToken.where(user_id: user.id).each(&:destroy!)
|
||||||
end
|
end
|
||||||
|
|
||||||
MessageBus.publish "/file-change", ["refresh"], user_ids: [user.id]
|
|
||||||
|
|
||||||
render json: success_json
|
render json: success_json
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user