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

enable guest access for the 3pl/3pid APIs #1986

Merged
merged 2 commits into from
Mar 31, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions synapse/rest/client/v2_alpha/thirdparty.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def __init__(self, hs):

@defer.inlineCallbacks
def on_GET(self, request):
yield self.auth.get_user_by_req(request)
yield self.auth.get_user_by_req(request, allow_guest=True)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should keep the auth checks and instead add allow_guest=True param.


protocols = yield self.appservice_handler.get_3pe_protocols()
defer.returnValue((200, protocols))
Expand All @@ -54,7 +54,7 @@ def __init__(self, hs):

@defer.inlineCallbacks
def on_GET(self, request, protocol):
yield self.auth.get_user_by_req(request)
yield self.auth.get_user_by_req(request, allow_guest=True)

protocols = yield self.appservice_handler.get_3pe_protocols(
only_protocol=protocol,
Expand All @@ -77,7 +77,7 @@ def __init__(self, hs):

@defer.inlineCallbacks
def on_GET(self, request, protocol):
yield self.auth.get_user_by_req(request)
yield self.auth.get_user_by_req(request, allow_guest=True)

fields = request.args
fields.pop("access_token", None)
Expand All @@ -101,7 +101,7 @@ def __init__(self, hs):

@defer.inlineCallbacks
def on_GET(self, request, protocol):
yield self.auth.get_user_by_req(request)
yield self.auth.get_user_by_req(request, allow_guest=True)

fields = request.args
fields.pop("access_token", None)
Expand Down