fix(accounts): added permission checks on get_available_payment_schedules (backport #58588) (#58595)

Co-authored-by: Diptanil Saha <diptanil@frappe.io>
This commit is contained in:
mergify[bot]
2026-08-31 17:14:27 +05:30
committed by GitHub
parent d95eeb0f6a
commit 765a7736ed

View File

@@ -1188,6 +1188,7 @@ def get_irequests_of_payment_request(doc: str | None = None) -> list:
@frappe.whitelist()
def get_available_payment_schedules(reference_doctype, reference_name):
ref_doc = frappe.get_doc(reference_doctype, reference_name)
ref_doc.check_permission()
if not hasattr(ref_doc, "payment_schedule") or not ref_doc.payment_schedule:
return []