diff options
author | Matthew Hodgson <matthew@matrix.org> | 2018-01-19 15:33:55 +0000 |
---|---|---|
committer | Matthew Hodgson <matthew@matrix.org> | 2018-01-19 15:33:55 +0000 |
commit | 447f4f0d5f136dcadd5fdc286ded2d6e24a3f686 (patch) | |
tree | db585cee8d6f0414d353aa7b503d0855b5fdbb92 /synapse/config | |
parent | fix up v1, and improve errors (diff) | |
download | synapse-447f4f0d5f136dcadd5fdc286ded2d6e24a3f686.tar.xz |
rewrite based on PR feedback:
* [ ] split config options into allowed_local_3pids and registrations_require_3pid * [ ] simplify and comment logic for picking registration flows * [ ] fix docstring and move check_3pid_allowed into a new util module * [ ] use check_3pid_allowed everywhere @erikjohnston PTAL
Diffstat (limited to 'synapse/config')
-rw-r--r-- | synapse/config/registration.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/synapse/config/registration.py b/synapse/config/registration.py index e5e4f77872..336959094b 100644 --- a/synapse/config/registration.py +++ b/synapse/config/registration.py @@ -32,6 +32,7 @@ class RegistrationConfig(Config): ) self.registrations_require_3pid = config.get("registrations_require_3pid", []) + self.allowed_local_3pids = config.get("allowed_local_3pids", []) self.registration_shared_secret = config.get("registration_shared_secret") self.bcrypt_rounds = config.get("bcrypt_rounds", 12) @@ -53,11 +54,16 @@ class RegistrationConfig(Config): # Enable registration for new users. enable_registration: False - # Mandate that registrations require a 3PID which matches one or more - # of these 3PIDs. N.B. regexp escape backslashes are doubled (once for - # YAML and once for the regexp itself) + # The user must provide all of the below types of 3PID when registering. # # registrations_require_3pid: + # - email + # - msisdn + + # Mandate that users are only allowed to associate certain formats of + # 3PIDs with accounts on this server. + # + # allowed_local_3pids: # - medium: email # pattern: ".*@matrix\\.org" # - medium: email |