fix: add perm check on user email awaiting
This commit is contained in:
parent
1cf89c9bc9
commit
c19dd276ba
1 changed files with 3 additions and 0 deletions
|
|
@ -1038,6 +1038,9 @@ def has_email_account(email: str):
|
|||
|
||||
@frappe.whitelist(allow_guest=False)
|
||||
def get_email_awaiting(user: str):
|
||||
if user != frappe.session.user:
|
||||
frappe.has_permission("User", "read", doc=user, throw=True)
|
||||
|
||||
return frappe.get_all(
|
||||
"User Email",
|
||||
fields=["email_account", "email_id"],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue