mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-07 07:02:15 -04:00
Implement exclusive namespace checks.
This commit is contained in:
parent
de190e49d5
commit
58ff066064
2 changed files with 18 additions and 7 deletions
|
@ -201,11 +201,12 @@ class RegistrationHandler(BaseHandler):
|
|||
interested_services = [
|
||||
s for s in services if s.is_interested_in_user(user_id)
|
||||
]
|
||||
if len(interested_services) > 0:
|
||||
raise SynapseError(
|
||||
400, "This user ID is reserved by an application service.",
|
||||
errcode=Codes.EXCLUSIVE
|
||||
)
|
||||
for service in interested_services:
|
||||
if service.is_exclusive_user(user_id):
|
||||
raise SynapseError(
|
||||
400, "This user ID is reserved by an application service.",
|
||||
errcode=Codes.EXCLUSIVE
|
||||
)
|
||||
|
||||
def _generate_token(self, user_id):
|
||||
# urlsafe variant uses _ and - so use . as the separator and replace
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue