Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Load /password_policy endpoint on workers #15331

Merged
merged 3 commits into from
Mar 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/15331.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Allow loading `/password_policy` endpoint on workers.
1 change: 1 addition & 0 deletions docker/configure_workers_and_start.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@
"^/_matrix/client/v1/rooms/.*/timestamp_to_event$",
"^/_matrix/client/(api/v1|r0|v3|unstable)/search",
"^/_matrix/client/(r0|v3|unstable)/user/.*/filter(/|$)",
"^/_matrix/client/(r0|v3|unstable)/password_policy$",
],
"shared_extra_conf": {},
"worker_extra_conf": "",
Expand Down
1 change: 1 addition & 0 deletions docs/workers.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ information.
^/_matrix/client/(r0|v3|unstable)/register$
^/_matrix/client/(r0|v3|unstable)/register/available$
^/_matrix/client/v1/register/m.login.registration_token/validity$
^/_matrix/client/(r0|v3|unstable)/password_policy$

# Event sending requests
^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/redact
Expand Down
3 changes: 1 addition & 2 deletions synapse/rest/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,7 @@ def register_servlets(client_resource: HttpServer, hs: "HomeServer") -> None:
capabilities.register_servlets(hs, client_resource)
account_validity.register_servlets(hs, client_resource)
relations.register_servlets(hs, client_resource)
if is_main_process:
password_policy.register_servlets(hs, client_resource)
password_policy.register_servlets(hs, client_resource)
knock.register_servlets(hs, client_resource)
appservice_ping.register_servlets(hs, client_resource)

Expand Down
1 change: 1 addition & 0 deletions synapse/rest/client/password_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

class PasswordPolicyServlet(RestServlet):
PATTERNS = client_patterns("/password_policy$")
CATEGORY = "Registration/login requests"

def __init__(self, hs: "HomeServer"):
super().__init__()
Expand Down