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:
parent
fc5ea75350
commit
461ea81783
1 changed files with 2 additions and 0 deletions
|
|
@ -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."))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue