mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-20 03:47:11 +00:00
Merge pull request #56191 from diptanilsaha/fix/perms_on_whitelisted_functions
fix: added missing permission validation on whitelisted function and removed unnecessary whitelisted decorator
This commit is contained in:
@@ -626,6 +626,8 @@ def get_account_details(
|
|||||||
party: str | None = None,
|
party: str | None = None,
|
||||||
rounding_loss_allowance: float = 0.0,
|
rounding_loss_allowance: float = 0.0,
|
||||||
):
|
):
|
||||||
|
frappe.has_permission("Account", doc=account, throw=True)
|
||||||
|
|
||||||
if not (company and posting_date):
|
if not (company and posting_date):
|
||||||
frappe.throw(_("Company and Posting Date is mandatory"))
|
frappe.throw(_("Company and Posting Date is mandatory"))
|
||||||
|
|
||||||
|
|||||||
@@ -146,7 +146,6 @@ def get_appropriate_company(filters):
|
|||||||
return company
|
return company
|
||||||
|
|
||||||
|
|
||||||
@frappe.whitelist()
|
|
||||||
def get_invoiced_item_gross_margin(
|
def get_invoiced_item_gross_margin(
|
||||||
sales_invoice: str | None = None,
|
sales_invoice: str | None = None,
|
||||||
item_code: str | None = None,
|
item_code: str | None = None,
|
||||||
|
|||||||
Reference in New Issue
Block a user