summary refs log tree commit diff
path: root/synapse/rest
diff options
context:
space:
mode:
authorDavid Teller <d.o.teller+github@gmail.com>2021-01-28 12:18:07 +0100
committerDavid Teller <d.o.teller+github@gmail.com>2021-01-28 12:31:07 +0100
commitb859919acc3ad6c61ba26a3c9b1e36c75a30c3fe (patch)
tree96fffaa67839992091581e50c76ef8d48ec5d50e /synapse/rest
parentFIXUP: Don't filter events at all for admin/v1/rooms/.../context/... (diff)
downloadsynapse-b859919acc3ad6c61ba26a3c9b1e36c75a30c3fe.tar.xz
FIXUP: Now testing that the user is admin!
Diffstat (limited to 'synapse/rest')
-rw-r--r--synapse/rest/admin/rooms.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/rest/admin/rooms.py b/synapse/rest/admin/rooms.py
index 6539655289..4393197549 100644
--- a/synapse/rest/admin/rooms.py
+++ b/synapse/rest/admin/rooms.py
@@ -578,7 +578,8 @@ class RoomEventContextServlet(RestServlet):
         self.auth = hs.get_auth()
 
     async def on_GET(self, request, room_id, event_id):
-        requester = await self.auth.get_user_by_req(request, allow_guest=True)
+        requester = await self.auth.get_user_by_req(request, allow_guest=False)
+        await assert_user_is_admin(self.auth, requester.user)
 
         limit = parse_integer(request, "limit", default=10)