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
  • Loading branch information
anoadragon453 committed Feb 19, 2020
2 parents 1e37fbb + 8e513e7 commit a47d952
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 a47d952

Please sign in to comment.