mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-18 14:24:19 -05:00
Add user_type
to returned fields in admin API user list endpoints
Mostly user type will be empty (normal user) but there is also the "support" user type. Signed-off-by: Jason Robinson <jasonr@matrix.org>
This commit is contained in:
parent
f337d2f0f0
commit
66f5ff72fd
1
changelog.d/5731.misc
Normal file
1
changelog.d/5731.misc
Normal file
@ -0,0 +1 @@
|
||||
Return 'user_type' in admin API user endpoints results.
|
@ -469,7 +469,7 @@ class DataStore(
|
||||
return self._simple_select_list(
|
||||
table="users",
|
||||
keyvalues={},
|
||||
retcols=["name", "password_hash", "is_guest", "admin"],
|
||||
retcols=["name", "password_hash", "is_guest", "admin", "user_type"],
|
||||
desc="get_users",
|
||||
)
|
||||
|
||||
@ -494,7 +494,7 @@ class DataStore(
|
||||
orderby=order,
|
||||
start=start,
|
||||
limit=limit,
|
||||
retcols=["name", "password_hash", "is_guest", "admin"],
|
||||
retcols=["name", "password_hash", "is_guest", "admin", "user_type"],
|
||||
)
|
||||
count = yield self.runInteraction("get_users_paginate", self.get_user_count_txn)
|
||||
retval = {"users": users, "total": count}
|
||||
@ -514,7 +514,7 @@ class DataStore(
|
||||
table="users",
|
||||
term=term,
|
||||
col="name",
|
||||
retcols=["name", "password_hash", "is_guest", "admin"],
|
||||
retcols=["name", "password_hash", "is_guest", "admin", "user_type"],
|
||||
desc="search_users",
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user