mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 11:16:07 -04:00
Stop looking up "admin", which we never read
This commit is contained in:
parent
57619d6058
commit
a9d8bd95e7
9 changed files with 5 additions and 24 deletions
|
@ -163,8 +163,7 @@ class RegistrationStore(SQLBaseStore):
|
|||
Args:
|
||||
token (str): The access token of a user.
|
||||
Returns:
|
||||
dict: Including the name (user_id) and whether they are
|
||||
an admin.
|
||||
dict: Including the name (user_id) and the ID of their access token.
|
||||
Raises:
|
||||
StoreError if no user was found.
|
||||
"""
|
||||
|
@ -228,7 +227,7 @@ class RegistrationStore(SQLBaseStore):
|
|||
|
||||
def _query_for_auth(self, txn, token):
|
||||
sql = (
|
||||
"SELECT users.name, users.admin, access_tokens.id as token_id"
|
||||
"SELECT users.name, access_tokens.id as token_id"
|
||||
" FROM users"
|
||||
" INNER JOIN access_tokens on users.name = access_tokens.user_id"
|
||||
" WHERE token = ?"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue