diff options
author | Mathieu Velten <mathieuv@matrix.org> | 2023-08-10 11:10:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-10 09:10:55 +0000 |
commit | dac97642e41f3f4bc0deff0c80b6a3f7acb4dbc0 (patch) | |
tree | d13c5ad7f19ee84223129dd1693331f8866d952c /synapse/handlers | |
parent | Support MSC3814: Dehydrated Devices Part 2 (#16010) (diff) | |
download | synapse-dac97642e41f3f4bc0deff0c80b6a3f7acb4dbc0.tar.xz |
Implements admin API to lock an user (MSC3939) (#15870)
Diffstat (limited to 'synapse/handlers')
-rw-r--r-- | synapse/handlers/admin.py | 1 | ||||
-rw-r--r-- | synapse/handlers/user_directory.py | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/synapse/handlers/admin.py b/synapse/handlers/admin.py index 119c7f8384..0e812a6d8b 100644 --- a/synapse/handlers/admin.py +++ b/synapse/handlers/admin.py @@ -67,6 +67,7 @@ class AdminHandler: "name", "admin", "deactivated", + "locked", "shadow_banned", "creation_ts", "appservice_id", diff --git a/synapse/handlers/user_directory.py b/synapse/handlers/user_directory.py index 05197edc95..a0f5568000 100644 --- a/synapse/handlers/user_directory.py +++ b/synapse/handlers/user_directory.py @@ -94,6 +94,7 @@ class UserDirectoryHandler(StateDeltasHandler): self.is_mine_id = hs.is_mine_id self.update_user_directory = hs.config.worker.should_update_user_directory self.search_all_users = hs.config.userdirectory.user_directory_search_all_users + self.show_locked_users = hs.config.userdirectory.show_locked_users self._spam_checker_module_callbacks = hs.get_module_api_callbacks().spam_checker self._hs = hs @@ -144,7 +145,9 @@ class UserDirectoryHandler(StateDeltasHandler): ] } """ - results = await self.store.search_user_dir(user_id, search_term, limit) + results = await self.store.search_user_dir( + user_id, search_term, limit, self.show_locked_users + ) # Remove any spammy users from the results. non_spammy_users = [] |