diff options
author | Matthew Hodgson <matthew@matrix.org> | 2018-05-03 02:51:49 +0100 |
---|---|---|
committer | Matthew Hodgson <matthew@matrix.org> | 2018-05-03 02:51:49 +0100 |
commit | 79b2583f1b41a088a6b8918c647ceab1c0c25315 (patch) | |
tree | cd67126751732f6e0d35c8e82006bb534b7430c0 /synapse/config | |
parent | turn @'s to -'s rather than .'s (diff) | |
parent | Merge branch 'master' into dinsic (diff) | |
download | synapse-79b2583f1b41a088a6b8918c647ceab1c0c25315.tar.xz |
Merge branch 'dinsic' into matthew/derive-mxid-from-3pid
Diffstat (limited to 'synapse/config')
-rw-r--r-- | synapse/config/registration.py | 24 | ||||
-rw-r--r-- | synapse/config/user_directory.py | 9 |
2 files changed, 33 insertions, 0 deletions
diff --git a/synapse/config/registration.py b/synapse/config/registration.py index a3d752f094..0731004b81 100644 --- a/synapse/config/registration.py +++ b/synapse/config/registration.py @@ -33,6 +33,10 @@ class RegistrationConfig(Config): self.registrations_require_3pid = config.get("registrations_require_3pid", []) self.allowed_local_3pids = config.get("allowed_local_3pids", []) + self.check_is_for_allowed_local_3pids = config.get( + "check_is_for_allowed_local_3pids", None + ) + self.allow_invited_3pids = config.get("allow_invited_3pids", False) self.registration_shared_secret = config.get("registration_shared_secret") self.register_mxid_from_3pid = config.get("register_mxid_from_3pid") @@ -46,6 +50,10 @@ class RegistrationConfig(Config): self.auto_join_rooms = config.get("auto_join_rooms", []) + 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, ] + def default_config(self, **kwargs): registration_shared_secret = random_string_with_symbols(50) @@ -71,6 +79,16 @@ class RegistrationConfig(Config): # Mandate that users are only allowed to associate certain formats of # 3PIDs with accounts on this server. # + # Use an Identity Server to establish which 3PIDs are allowed to register? + # Overrides allowed_local_3pids below. + # check_is_for_allowed_local_3pids: matrix.org + # + # If you are using an IS you can also check whether that IS registers + # pending invites for the given 3PID (and then allow it to sign up on + # the platform): + # + # allow_invited_3pids: False + # # allowed_local_3pids: # - medium: email # pattern: ".*@matrix\\.org" @@ -102,6 +120,12 @@ class RegistrationConfig(Config): - vector.im - riot.im + # If enabled, user IDs, display names and avatar URLs will be replicated + # to this server whenever they change. + # This is an experimental API currently implemented by sydent to support + # cross-homeserver user directories. + # replicate_user_profiles_to: example.com + # Users who register on this homeserver will automatically be joined # to these rooms #auto_join_rooms: diff --git a/synapse/config/user_directory.py b/synapse/config/user_directory.py index 38e8947843..9b0ae91289 100644 --- a/synapse/config/user_directory.py +++ b/synapse/config/user_directory.py @@ -23,11 +23,15 @@ class UserDirectoryConfig(Config): def read_config(self, config): self.user_directory_search_all_users = False + self.user_directory_defer_to_id_server = None user_directory_config = config.get("user_directory", None) if user_directory_config: self.user_directory_search_all_users = ( user_directory_config.get("search_all_users", False) ) + self.user_directory_defer_to_id_server = ( + user_directory_config.get("defer_to_id_server", None) + ) def default_config(self, config_dir_path, server_name, **kwargs): return """ @@ -41,4 +45,9 @@ class UserDirectoryConfig(Config): # #user_directory: # search_all_users: false + # + # If this is set, user search will be delegated to this ID server instead + # of synapse performing the search itself. + # This is an experimental API. + # defer_to_id_server: id.example.com """ |