summary refs log tree commit diff
path: root/synapse/rest/client
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2016-06-02 17:21:31 +0100
committerDavid Baker <dave@matrix.org>2016-06-02 17:21:31 +0100
commit1f31cc37f8611f9ae5612ef5be82e63735fbdf34 (patch)
tree20ac10037b1e13b61ed709ae665925fe53df6e46 /synapse/rest/client
parentMerge remote-tracking branch 'origin/dbkr/email_notif_string_fmt_error' into ... (diff)
downloadsynapse-1f31cc37f8611f9ae5612ef5be82e63735fbdf34.tar.xz
Working unsubscribe links going straight to the HS
and authed by macaroons that let you delete pushers and nothing else
Diffstat (limited to 'synapse/rest/client')
-rw-r--r--synapse/rest/client/v1/pusher.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/rest/client/v1/pusher.py b/synapse/rest/client/v1/pusher.py
index fa7a0992dd..9a2ed6ed88 100644
--- a/synapse/rest/client/v1/pusher.py
+++ b/synapse/rest/client/v1/pusher.py
@@ -149,11 +149,13 @@ class PushersRemoveRestServlet(RestServlet):
 
     def __init__(self, hs):
         super(RestServlet, self).__init__()
+        self.hs = hs
         self.notifier = hs.get_notifier()
+        self.auth = hs.get_v1auth()
 
     @defer.inlineCallbacks
     def on_GET(self, request):
-        requester = yield self.auth.get_user_by_req(request, "delete_pusher")
+        requester = yield self.auth.get_user_by_req(request, rights="delete_pusher")
         user = requester.user
 
         app_id = parse_string(request, "app_id", required=True)