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

Commit 4fc85e5

Browse files
authored
Load /password_policy endpoint on workers. (#15331)
1 parent 7a892ce commit 4fc85e5

File tree

5 files changed

+5
-2
lines changed

5 files changed

+5
-2
lines changed

changelog.d/15331.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Allow loading `/password_policy` endpoint on workers.

docker/configure_workers_and_start.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@
172172
"^/_matrix/client/v1/rooms/.*/timestamp_to_event$",
173173
"^/_matrix/client/(api/v1|r0|v3|unstable)/search",
174174
"^/_matrix/client/(r0|v3|unstable)/user/.*/filter(/|$)",
175+
"^/_matrix/client/(r0|v3|unstable)/password_policy$",
175176
],
176177
"shared_extra_conf": {},
177178
"worker_extra_conf": "",

docs/workers.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ information.
247247
^/_matrix/client/(r0|v3|unstable)/register$
248248
^/_matrix/client/(r0|v3|unstable)/register/available$
249249
^/_matrix/client/v1/register/m.login.registration_token/validity$
250+
^/_matrix/client/(r0|v3|unstable)/password_policy$
250251

251252
# Event sending requests
252253
^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/redact

synapse/rest/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,7 @@ def register_servlets(client_resource: HttpServer, hs: "HomeServer") -> None:
138138
capabilities.register_servlets(hs, client_resource)
139139
account_validity.register_servlets(hs, client_resource)
140140
relations.register_servlets(hs, client_resource)
141-
if is_main_process:
142-
password_policy.register_servlets(hs, client_resource)
141+
password_policy.register_servlets(hs, client_resource)
143142
knock.register_servlets(hs, client_resource)
144143
appservice_ping.register_servlets(hs, client_resource)
145144

synapse/rest/client/password_policy.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131

3232
class PasswordPolicyServlet(RestServlet):
3333
PATTERNS = client_patterns("/password_policy$")
34+
CATEGORY = "Registration/login requests"
3435

3536
def __init__(self, hs: "HomeServer"):
3637
super().__init__()

0 commit comments

Comments
 (0)