summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorWill Hunt <will@half-shot.uk>2022-04-27 13:57:53 +0100
committerGitHub <noreply@github.com>2022-04-27 12:57:53 +0000
commite8d1ec0e92da96a01b6c723fcdb4eac27f801e87 (patch)
treea751bfd0999028ee404e1a373fa376c7762bfa15 /synapse/handlers
parentAdd some type hints to datastore (#12485) (diff)
downloadsynapse-e8d1ec0e92da96a01b6c723fcdb4eac27f801e87.tar.xz
Add option to enable token registration without requiring 3pids (#12526)
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/ui_auth/checkers.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/handlers/ui_auth/checkers.py b/synapse/handlers/ui_auth/checkers.py
index 472b029af3..e2a441066d 100644
--- a/synapse/handlers/ui_auth/checkers.py
+++ b/synapse/handlers/ui_auth/checkers.py
@@ -256,7 +256,9 @@ class RegistrationTokenAuthChecker(UserInteractiveAuthChecker):
     def __init__(self, hs: "HomeServer"):
         super().__init__(hs)
         self.hs = hs
-        self._enabled = bool(hs.config.registration.registration_requires_token)
+        self._enabled = bool(
+            hs.config.registration.registration_requires_token
+        ) or bool(hs.config.registration.enable_registration_token_3pid_bypasss)
         self.store = hs.get_datastores().main
 
     def is_enabled(self) -> bool: