Merge pull request #38941 from AarDG10/fix-email-acc
fix(email_account): add perm. check to set_email_password
This commit is contained in:
commit
3b8d67ae11
1 changed files with 1 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue