diff options
author | Erik Johnston <erik@matrix.org> | 2019-03-19 16:40:19 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2019-03-19 16:40:19 +0000 |
commit | 320667a47977ebbc9a1c0f320a06c80f953a4f86 (patch) | |
tree | a30709c39d10393807749e2890a6ec3318bc6494 /synapse/config | |
parent | Merge pull request #4894 from matrix-org/erikj/postgres_tuning (diff) | |
download | synapse-320667a47977ebbc9a1c0f320a06c80f953a4f86.tar.xz |
Add option to disable searching in the user dir
We still populate it, as it can still be accessed via the admin API.
Diffstat (limited to 'synapse/config')
-rw-r--r-- | synapse/config/user_directory.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/synapse/config/user_directory.py b/synapse/config/user_directory.py index fab3a7d1c8..e3c063c148 100644 --- a/synapse/config/user_directory.py +++ b/synapse/config/user_directory.py @@ -22,9 +22,13 @@ class UserDirectoryConfig(Config): """ def read_config(self, config): + self.user_directory_search_enabled = True self.user_directory_search_all_users = False user_directory_config = config.get("user_directory", None) if user_directory_config: + self.user_directory_search_enabled = ( + user_directory_config.get("enabled", True) + ) self.user_directory_search_all_users = ( user_directory_config.get("search_all_users", False) ) @@ -33,6 +37,8 @@ class UserDirectoryConfig(Config): return """ # User Directory configuration # + # 'enabled' defines whether users can search the user directory, + # defaults to True. # 'search_all_users' defines whether to search all users visible to your HS # when searching the user directory, rather than limiting to users visible # in public rooms. Defaults to false. If you set it True, you'll have to run @@ -40,5 +46,6 @@ class UserDirectoryConfig(Config): # on your database to tell it to rebuild the user_directory search indexes. # #user_directory: + # enabled: true # search_all_users: false """ |