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

Commit

Permalink
Merge pull request #5731 from matrix-org/jaywink/admin-user-list-user…
Browse files Browse the repository at this point in the history
…-type

Add `user_type` to returned fields in admin API user list endpoints
  • Loading branch information
jaywink authored Jul 22, 2019
2 parents 0cb7281 + 66f5ff7 commit 8e513e7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
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

0 comments on commit 8e513e7

Please sign in to comment.