diff options
author | Jason Robinson <jasonr@matrix.org> | 2019-07-22 15:21:19 +0300 |
---|---|---|
committer | Jason Robinson <jasonr@matrix.org> | 2019-07-22 15:29:18 +0300 |
commit | 66f5ff72fd2179c2cbb6a7755d36273d51a2e32f (patch) | |
tree | 01e4e9ac25d0ecd615bf57155ca3a38025b40a95 /synapse/storage/__init__.py | |
parent | Demo uses deprecated cli option (#5725) (diff) | |
download | synapse-66f5ff72fd2179c2cbb6a7755d36273d51a2e32f.tar.xz |
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>
Diffstat (limited to 'synapse/storage/__init__.py')
-rw-r--r-- | synapse/storage/__init__.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/storage/__init__.py b/synapse/storage/__init__.py index 6b0ca80087..86a333a919 100644 --- a/synapse/storage/__init__.py +++ b/synapse/storage/__init__.py @@ -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", ) |