Merge pull request #38941 from AarDG10/fix-email-acc

fix(email_account): add perm. check to set_email_password
This commit is contained in:
Aarol D'Souza 2026-04-28 12:15:52 +05:30 committed by GitHub
commit 3b8d67ae11
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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