diff options
author | Matthew Hodgson <matthew@matrix.org> | 2018-05-03 23:39:08 +0100 |
---|---|---|
committer | Matthew Hodgson <matthew@matrix.org> | 2018-05-03 23:39:08 +0100 |
commit | 383c4ae59cea831d7006506949376c8a65fd01b8 (patch) | |
tree | ef358cadb0648a53e0c686eb00cbc01b45dc397a /synapse/config | |
parent | special case msisdns when deriving mxids from 3pids (diff) | |
parent | Merge pull request #3180 from matrix-org/matthew/disable-3pid-changes (diff) | |
download | synapse-383c4ae59cea831d7006506949376c8a65fd01b8.tar.xz |
Merge branch 'dinsic' into matthew/derive-mxid-from-3pid
Diffstat (limited to 'synapse/config')
-rw-r--r-- | synapse/config/registration.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/synapse/config/registration.py b/synapse/config/registration.py index 0731004b81..3313c64113 100644 --- a/synapse/config/registration.py +++ b/synapse/config/registration.py @@ -37,6 +37,9 @@ class RegistrationConfig(Config): "check_is_for_allowed_local_3pids", None ) self.allow_invited_3pids = config.get("allow_invited_3pids", False) + + self.disable_3pid_changes = config.get("disable_3pid_changes", False) + self.registration_shared_secret = config.get("registration_shared_secret") self.register_mxid_from_3pid = config.get("register_mxid_from_3pid") @@ -50,6 +53,9 @@ class RegistrationConfig(Config): self.auto_join_rooms = config.get("auto_join_rooms", []) + self.disable_set_displayname = config.get("disable_set_displayname", False) + self.disable_set_avatar_url = config.get("disable_set_avatar_url", False) + self.replicate_user_profiles_to = config.get("replicate_user_profiles_to", []) if not isinstance(self.replicate_user_profiles_to, list): self.replicate_user_profiles_to = [self.replicate_user_profiles_to, ] @@ -97,6 +103,11 @@ class RegistrationConfig(Config): # - medium: msisdn # pattern: "\\+44" + # If true, stop users from trying to change the 3PIDs associated with + # their accounts. + # + # disable_3pid_changes: False + # If set, allows registration by anyone who also has the shared # secret, even if registration is otherwise disabled. registration_shared_secret: "%(registration_shared_secret)s" @@ -126,10 +137,19 @@ class RegistrationConfig(Config): # cross-homeserver user directories. # replicate_user_profiles_to: example.com + # If enabled, don't let users set their own display names/avatars + # other than for the very first time (unless they are a server admin). + # Useful when provisioning users based on the contents of a 3rd party + # directory and to avoid ambiguities. + # + # disable_set_displayname: False + # disable_set_avatar_url: False + # Users who register on this homeserver will automatically be joined # to these rooms #auto_join_rooms: # - "#example:example.com" + """ % locals() def add_arguments(self, parser): |