mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-07 21:12:20 -04:00
Allow new users to be registered via the admin API even if the monthly active user limit has been reached (#7263)
This commit is contained in:
parent
2970ce8367
commit
908f9e2d24
4 changed files with 172 additions and 16 deletions
|
@ -150,6 +150,7 @@ class RegistrationHandler(BaseHandler):
|
|||
default_display_name=None,
|
||||
address=None,
|
||||
bind_emails=[],
|
||||
by_admin=False,
|
||||
):
|
||||
"""Registers a new client on the server.
|
||||
|
||||
|
@ -165,6 +166,8 @@ class RegistrationHandler(BaseHandler):
|
|||
will be set to this. Defaults to 'localpart'.
|
||||
address (str|None): the IP address used to perform the registration.
|
||||
bind_emails (List[str]): list of emails to bind to this account.
|
||||
by_admin (bool): True if this registration is being made via the
|
||||
admin api, otherwise False.
|
||||
Returns:
|
||||
Deferred[str]: user_id
|
||||
Raises:
|
||||
|
@ -172,7 +175,9 @@ class RegistrationHandler(BaseHandler):
|
|||
"""
|
||||
yield self.check_registration_ratelimit(address)
|
||||
|
||||
yield self.auth.check_auth_blocking(threepid=threepid)
|
||||
# do not check_auth_blocking if the call is coming through the Admin API
|
||||
if not by_admin:
|
||||
yield self.auth.check_auth_blocking(threepid=threepid)
|
||||
|
||||
if localpart is not None:
|
||||
yield self.check_username(localpart, guest_access_token=guest_access_token)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue