mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-05 02:05:00 -04:00
Consistently check whether a password may be set for a user. (#9636)
This commit is contained in:
parent
dd71eb0f8a
commit
8dd2ea65a9
5 changed files with 133 additions and 68 deletions
|
@ -41,7 +41,7 @@ class SetPasswordHandler(BaseHandler):
|
|||
logout_devices: bool,
|
||||
requester: Optional[Requester] = None,
|
||||
) -> None:
|
||||
if not self.hs.config.password_localdb_enabled:
|
||||
if not self._auth_handler.can_change_password():
|
||||
raise SynapseError(403, "Password change disabled", errcode=Codes.FORBIDDEN)
|
||||
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue