summary refs log tree commit diff
path: root/synapse/rest/admin
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2023-10-10 12:16:36 -0400
committerGitHub <noreply@github.com>2023-10-10 12:16:36 -0400
commitf1e43018b7d526f3e969796bf882c1848b663449 (patch)
treea2a33ea2910094f5dc88eef6f7efea1214ce573e /synapse/rest/admin
parentMerge remote-tracking branch 'origin/master' into develop (diff)
downloadsynapse-f1e43018b7d526f3e969796bf882c1848b663449.tar.xz
Inline simple_search_list/simple_search_list_txn. (#16434)
This only has a single use and is over abstracted. Inline it so that
we can improve type hints.
Diffstat (limited to 'synapse/rest/admin')
-rw-r--r--synapse/rest/admin/users.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/synapse/rest/admin/users.py b/synapse/rest/admin/users.py
index 5b743a1d03..cd995e8dbb 100644
--- a/synapse/rest/admin/users.py
+++ b/synapse/rest/admin/users.py
@@ -842,7 +842,18 @@ class SearchUsersRestServlet(RestServlet):
         logger.info("term: %s ", term)
 
         ret = await self.store.search_users(term)
-        return HTTPStatus.OK, ret
+        results = [
+            {
+                "name": name,
+                "password_hash": password_hash,
+                "is_guest": bool(is_guest),
+                "admin": bool(admin),
+                "user_type": user_type,
+            }
+            for name, password_hash, is_guest, admin, user_type in ret
+        ]
+
+        return HTTPStatus.OK, results
 
 
 class UserAdminServlet(RestServlet):