mirror of
https://github.com/element-hq/synapse.git
synced 2024-11-23 10:05:55 +03:00
Require AS users to be registered before use
This commit is contained in:
parent
37716d55ed
commit
7d09ab8915
1 changed files with 5 additions and 0 deletions
|
@ -528,6 +528,11 @@ class Auth(object):
|
||||||
403,
|
403,
|
||||||
"Application service cannot masquerade as this user."
|
"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:
|
if not user_id:
|
||||||
raise KeyError
|
raise KeyError
|
||||||
|
|
Loading…
Reference in a new issue