Skip to content
Snippets Groups Projects
Commit d14fcfd2 authored by Daniel Wagner-Hall's avatar Daniel Wagner-Hall
Browse files

Merge pull request #487 from matrix-org/daniel/forceregistration

Require AS users to be registered before use
parents 27927463 7d09ab89
No related branches found
No related tags found
No related merge requests found
......@@ -528,6 +528,11 @@ class Auth(object):
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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment