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

Require AS users to be registered before use #487

Merged
merged 1 commit into from
Jan 14, 2016
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
5 changes: 5 additions & 0 deletions synapse/api/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,11 @@ def get_user_by_req(self, request, allow_guest=False):
403,
"Application service cannot masquerade as this user."
)
if not (yield self.store.get_user_by_id(user_id)):
raise AuthError(
403,
"Application service has not registered this user"
)

if not user_id:
raise KeyError
Expand Down