fix(ldap): sync backend and frontend restrictions (#37411)

Only System Managers can use this functionality.

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
This commit is contained in:
Akhil Narang 2026-02-23 18:23:49 +05:30 committed by GitHub
parent fc5ea75350
commit 461ea81783
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -424,6 +424,8 @@ def login():
@frappe.whitelist()
def reset_password(user: str, password: str, logout: int):
frappe.only_for("System Manager")
ldap: LDAPSettings = frappe.get_doc("LDAP Settings")
if not ldap.enabled:
frappe.throw(_("LDAP is not enabled."))