fix(email_account): add perm. check to set_email_password
Not too certain why a perm. check was skipped here, adding nonetheless.
This commit is contained in:
parent
242e7b55ca
commit
dd9450dc46
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