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

Commit

Permalink
Fix merge screwup
Browse files Browse the repository at this point in the history
  • Loading branch information
babolivier committed Apr 17, 2019
1 parent 8631413 commit d20142c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions synapse/rest/client/v1/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -796,10 +796,17 @@ def __init__(self, hs):

@defer.inlineCallbacks
def on_POST(self, request, group_id):
requester = yield self.auth.get_user_by_req(request)
is_admin = yield self.auth.is_server_admin(requester.user)

if not is_admin:
raise AuthError(403, "You are not a server admin")

if not self.is_mine_id(group_id):
raise SynapseError(400, "Can only delete local groups")

yield self.group_server.delete_group(group_id, requester.user.to_string())
defer.returnValue((200, {}))


class AccountValidityRenewServlet(ClientV1RestServlet):
Expand Down

0 comments on commit d20142c

Please sign in to comment.