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

Commit

Permalink
Merge pull request #487 from matrix-org/daniel/forceregistration
Browse files Browse the repository at this point in the history
Require AS users to be registered before use
  • Loading branch information
illicitonion committed Jan 14, 2016
2 parents 2792746 + 7d09ab8 commit d14fcfd
Showing 1 changed file with 5 additions and 0 deletions.
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

0 comments on commit d14fcfd

Please sign in to comment.