diff options
author | Erik Johnston <erik@matrix.org> | 2016-08-15 17:04:39 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-08-15 17:04:39 +0100 |
commit | dc3a00f24f301ab08750fdd8ca6ae040ba290e1e (patch) | |
tree | 88653ea97c0e3cb01f73196727f71972c7d53cca /synapse/handlers/auth.py | |
parent | Merge pull request #1009 from matrix-org/erikj/event_split (diff) | |
download | synapse-dc3a00f24f301ab08750fdd8ca6ae040ba290e1e.tar.xz |
Refactor user_delete_access_tokens. Invalidate get_user_by_access_token to slaves.
Diffstat (limited to 'synapse/handlers/auth.py')
-rw-r--r-- | synapse/handlers/auth.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/handlers/auth.py b/synapse/handlers/auth.py index a582d6334b..6986930c0d 100644 --- a/synapse/handlers/auth.py +++ b/synapse/handlers/auth.py @@ -741,7 +741,7 @@ class AuthHandler(BaseHandler): def set_password(self, user_id, newpassword, requester=None): password_hash = self.hash(newpassword) - except_access_token_ids = [requester.access_token_id] if requester else [] + except_access_token_id = requester.access_token_id if requester else None try: yield self.store.user_set_password_hash(user_id, password_hash) @@ -750,10 +750,10 @@ class AuthHandler(BaseHandler): raise SynapseError(404, "Unknown user", Codes.NOT_FOUND) raise e yield self.store.user_delete_access_tokens( - user_id, except_access_token_ids + user_id, except_access_token_id ) yield self.hs.get_pusherpool().remove_pushers_by_user( - user_id, except_access_token_ids + user_id, except_access_token_id ) @defer.inlineCallbacks |