From dd9450dc46a5573087bb8872c179e34bdee2dd7d Mon Sep 17 00:00:00 2001 From: AarDG10 Date: Mon, 27 Apr 2026 17:34:28 +0530 Subject: [PATCH] fix(email_account): add perm. check to set_email_password Not too certain why a perm. check was skipped here, adding nonetheless. --- frappe/email/doctype/email_account/email_account.py | 1 + 1 file changed, 1 insertion(+) diff --git a/frappe/email/doctype/email_account/email_account.py b/frappe/email/doctype/email_account/email_account.py index 7be1b53ac1..fc8005087b 100755 --- a/frappe/email/doctype/email_account/email_account.py +++ b/frappe/email/doctype/email_account/email_account.py @@ -1135,6 +1135,7 @@ def remove_user_email_inbox(email_account): @frappe.whitelist() def set_email_password(email_account: str, password: str): + frappe.has_permission("Email Account", "write", email_account, throw=True) account = frappe.get_doc("Email Account", email_account) if account.awaiting_password and account.auth_method != "OAuth": account.awaiting_password = 0