diff options
author | Shay <hillerys@element.io> | 2022-08-24 14:18:31 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-24 14:18:31 -0700 |
commit | 172b651832cea2d832beb5c4ff5bfae4581c8e63 (patch) | |
tree | ebd49a80d21b84b51606da49d2a94241d4f1c13a /synapse/rest/admin/media.py | |
parent | fix test to align with new behaviour (diff) | |
parent | Rename `event_map` to `unpersisted_events` (#13603) (diff) | |
download | synapse-172b651832cea2d832beb5c4ff5bfae4581c8e63.tar.xz |
Merge branch 'develop' into shay/batch_events
Diffstat (limited to 'synapse/rest/admin/media.py')
-rw-r--r-- | synapse/rest/admin/media.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/rest/admin/media.py b/synapse/rest/admin/media.py index 19d4a008e8..73470f09ae 100644 --- a/synapse/rest/admin/media.py +++ b/synapse/rest/admin/media.py @@ -54,7 +54,7 @@ class QuarantineMediaInRoom(RestServlet): self, request: SynapseRequest, room_id: str ) -> Tuple[int, JsonDict]: requester = await self.auth.get_user_by_req(request) - await assert_user_is_admin(self.auth, requester.user) + await assert_user_is_admin(self.auth, requester) logging.info("Quarantining room: %s", room_id) @@ -81,7 +81,7 @@ class QuarantineMediaByUser(RestServlet): self, request: SynapseRequest, user_id: str ) -> Tuple[int, JsonDict]: requester = await self.auth.get_user_by_req(request) - await assert_user_is_admin(self.auth, requester.user) + await assert_user_is_admin(self.auth, requester) logging.info("Quarantining media by user: %s", user_id) @@ -110,7 +110,7 @@ class QuarantineMediaByID(RestServlet): self, request: SynapseRequest, server_name: str, media_id: str ) -> Tuple[int, JsonDict]: requester = await self.auth.get_user_by_req(request) - await assert_user_is_admin(self.auth, requester.user) + await assert_user_is_admin(self.auth, requester) logging.info("Quarantining media by ID: %s/%s", server_name, media_id) |