summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorDavid Teller <D.O.Teller@gmail.com>2021-01-11 20:32:17 +0100
committerGitHub <noreply@github.com>2021-01-11 14:32:17 -0500
commitb161528fccac4bf17f7afa9438a75d796433194e (patch)
tree1ec5cd647df5e032359ba3929951f4ce7bfaa7cc /synapse
parentMove more encryption endpoints off master (#9068) (diff)
downloadsynapse-b161528fccac4bf17f7afa9438a75d796433194e.tar.xz
Also support remote users on the joined_rooms admin API. (#8948)
For remote users, only the rooms which the server knows about are returned.
Local users have all of their joined rooms returned.
Diffstat (limited to 'synapse')
-rw-r--r--synapse/rest/admin/users.py7
1 files changed, 0 insertions, 7 deletions
diff --git a/synapse/rest/admin/users.py b/synapse/rest/admin/users.py
index 6658c2da56..f8a73e7d9d 100644
--- a/synapse/rest/admin/users.py
+++ b/synapse/rest/admin/users.py
@@ -714,13 +714,6 @@ class UserMembershipRestServlet(RestServlet):
     async def on_GET(self, request, user_id):
         await assert_requester_is_admin(self.auth, request)
 
-        if not self.is_mine(UserID.from_string(user_id)):
-            raise SynapseError(400, "Can only lookup local users")
-
-        user = await self.store.get_user_by_id(user_id)
-        if user is None:
-            raise NotFoundError("Unknown user")
-
         room_ids = await self.store.get_rooms_for_user(user_id)
         ret = {"joined_rooms": list(room_ids), "total": len(room_ids)}
         return 200, ret