From 534926230257ef65b683f439dd71156c359d5004 Mon Sep 17 00:00:00 2001 From: Neil Johnson Date: Mon, 21 Jan 2019 14:59:37 +0000 Subject: Config option to disable requesting MSISDN on registration --- synapse/config/registration.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'synapse/config') diff --git a/synapse/config/registration.py b/synapse/config/registration.py index 6c2b543b8c..e725773735 100644 --- a/synapse/config/registration.py +++ b/synapse/config/registration.py @@ -50,6 +50,8 @@ class RegistrationConfig(Config): raise ConfigError('Invalid auto_join_rooms entry %s' % (room_alias,)) self.autocreate_auto_join_rooms = config.get("autocreate_auto_join_rooms", True) + self.disable_msisdn_registration = config.get("disable_msisdn_registration", False) + def default_config(self, generate_secrets=False, **kwargs): if generate_secrets: registration_shared_secret = 'registration_shared_secret: "%s"' % ( @@ -70,6 +72,11 @@ class RegistrationConfig(Config): # - email # - msisdn + # Explicitly disable asking for MSISDNs from the registration + # flow (overrides registrations_require_3pid if MSISDNs are set as required) + # + # disable_msisdn_registration = True + # Mandate that users are only allowed to associate certain formats of # 3PIDs with accounts on this server. # -- cgit 1.4.1 From 1b53cc3cb4372d624194360b6039c5f7d05a2007 Mon Sep 17 00:00:00 2001 From: Neil Johnson Date: Mon, 21 Jan 2019 15:17:20 +0000 Subject: fix line length --- synapse/config/registration.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'synapse/config') diff --git a/synapse/config/registration.py b/synapse/config/registration.py index e725773735..fe520d6855 100644 --- a/synapse/config/registration.py +++ b/synapse/config/registration.py @@ -50,7 +50,9 @@ class RegistrationConfig(Config): raise ConfigError('Invalid auto_join_rooms entry %s' % (room_alias,)) self.autocreate_auto_join_rooms = config.get("autocreate_auto_join_rooms", True) - self.disable_msisdn_registration = config.get("disable_msisdn_registration", False) + self.disable_msisdn_registration = ( + config.get("disable_msisdn_registration", False) + ) def default_config(self, generate_secrets=False, **kwargs): if generate_secrets: -- cgit 1.4.1