mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 01:14:48 -04:00
Add option to disable searching in the user dir
We still populate it, as it can still be accessed via the admin API.
This commit is contained in:
parent
11f2125885
commit
320667a479
2 changed files with 13 additions and 0 deletions
|
@ -59,6 +59,12 @@ class UserDirectorySearchRestServlet(RestServlet):
|
|||
requester = yield self.auth.get_user_by_req(request, allow_guest=False)
|
||||
user_id = requester.user.to_string()
|
||||
|
||||
if not self.hs.config.user_directory_search_enabled:
|
||||
defer.returnValue((200, {
|
||||
"limited": False,
|
||||
"results": [],
|
||||
}))
|
||||
|
||||
body = parse_json_object_from_request(request)
|
||||
|
||||
limit = body.get("limit", 10)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue