diff options
author | Erik Johnston <erik@matrix.org> | 2017-10-02 13:52:03 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2017-10-02 13:52:03 +0100 |
commit | b23cb8fba8c783bf7a267bfbe33b50e010f17787 (patch) | |
tree | c43dc5b7ba3eb73bff695cae67f7c4122134a0ef /synapse/api/auth.py | |
parent | Merge pull request #2464 from rnbdsh/patch-4 (diff) | |
parent | Bump version and change log (diff) | |
download | synapse-b23cb8fba8c783bf7a267bfbe33b50e010f17787.tar.xz |
Merge branch 'release-v0.23.0' of github.com:matrix-org/synapse v0.23.0
Diffstat (limited to 'synapse/api/auth.py')
-rw-r--r-- | synapse/api/auth.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/synapse/api/auth.py b/synapse/api/auth.py index f8266d1c81..72858cca1f 100644 --- a/synapse/api/auth.py +++ b/synapse/api/auth.py @@ -209,7 +209,7 @@ class Auth(object): )[0] if user and access_token and ip_addr: self.store.insert_client_ip( - user=user, + user_id=user.to_string(), access_token=access_token, ip=ip_addr, user_agent=user_agent, @@ -519,6 +519,14 @@ class Auth(object): ) def is_server_admin(self, user): + """ Check if the given user is a local server admin. + + Args: + user (str): mxid of user to check + + Returns: + bool: True if the user is an admin + """ return self.store.is_server_admin(user) @defer.inlineCallbacks |