Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Add user_type to returned fields in admin API user list endpoints #5731

Merged
merged 1 commit into from
Jul 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/5731.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Return 'user_type' in admin API user endpoints results.
6 changes: 3 additions & 3 deletions synapse/storage/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ def get_users(self):
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",
)

Expand All @@ -494,7 +494,7 @@ def get_users_paginate(self, order, start, limit):
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}
Expand All @@ -514,7 +514,7 @@ def search_users(self, term):
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",
)

Expand Down