Skip to content
Snippets Groups Projects
Commit 66f5ff72 authored by Jason Robinson's avatar Jason Robinson
Browse files

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: default avatarJason Robinson <jasonr@matrix.org>
parent f337d2f0
No related branches found
No related tags found
No related merge requests found
Return 'user_type' in admin API user endpoints results.
...@@ -469,7 +469,7 @@ class DataStore( ...@@ -469,7 +469,7 @@ class DataStore(
return self._simple_select_list( return self._simple_select_list(
table="users", table="users",
keyvalues={}, keyvalues={},
retcols=["name", "password_hash", "is_guest", "admin"], retcols=["name", "password_hash", "is_guest", "admin", "user_type"],
desc="get_users", desc="get_users",
) )
...@@ -494,7 +494,7 @@ class DataStore( ...@@ -494,7 +494,7 @@ class DataStore(
orderby=order, orderby=order,
start=start, start=start,
limit=limit, 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) count = yield self.runInteraction("get_users_paginate", self.get_user_count_txn)
retval = {"users": users, "total": count} retval = {"users": users, "total": count}
...@@ -514,7 +514,7 @@ class DataStore( ...@@ -514,7 +514,7 @@ class DataStore(
table="users", table="users",
term=term, term=term,
col="name", col="name",
retcols=["name", "password_hash", "is_guest", "admin"], retcols=["name", "password_hash", "is_guest", "admin", "user_type"],
desc="search_users", desc="search_users",
) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment