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

Commit

Permalink
Fix typo in some instances of enable_registration_token_3pid_bypass. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Half-Shot authored May 5, 2022

Verified

This commit was signed with the committer’s verified signature.
laryjulien Julien Lary
1 parent c0379d6 commit cc76560
Showing 4 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions changelog.d/12639.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add new `enable_registration_token_3pid_bypass` configuration option to allow registrations via token as an alternative to verifying a 3pid.
4 changes: 2 additions & 2 deletions synapse/config/registration.py
Original file line number Diff line number Diff line change
@@ -43,8 +43,8 @@ def read_config(self, config: JsonDict, **kwargs: Any) -> None:
self.registration_requires_token = config.get(
"registration_requires_token", False
)
self.enable_registration_token_3pid_bypasss = config.get(
"enable_registration_token_3pid_bypasss", False
self.enable_registration_token_3pid_bypass = config.get(
"enable_registration_token_3pid_bypass", False
)
self.registration_shared_secret = config.get("registration_shared_secret")

2 changes: 1 addition & 1 deletion synapse/handlers/ui_auth/checkers.py
Original file line number Diff line number Diff line change
@@ -258,7 +258,7 @@ def __init__(self, hs: "HomeServer"):
self.hs = hs
self._enabled = bool(
hs.config.registration.registration_requires_token
) or bool(hs.config.registration.enable_registration_token_3pid_bypasss)
) or bool(hs.config.registration.enable_registration_token_3pid_bypass)
self.store = hs.get_datastores().main

def is_enabled(self) -> bool:
2 changes: 1 addition & 1 deletion synapse/rest/client/register.py
Original file line number Diff line number Diff line change
@@ -930,7 +930,7 @@ def _calculate_registration_flows(
flows.append([LoginType.MSISDN, LoginType.EMAIL_IDENTITY])

# Add a flow that doesn't require any 3pids, if the config requests it.
if config.registration.enable_registration_token_3pid_bypasss:
if config.registration.enable_registration_token_3pid_bypass:
flows.append([LoginType.REGISTRATION_TOKEN])

# Prepend m.login.terms to all flows if we're requiring consent

0 comments on commit cc76560

Please sign in to comment.