fix: enfore permission on make_payment_request

(cherry picked from commit b755ca12ca)
This commit is contained in:
ruthra kumar
2026-02-04 16:54:51 +05:30
committed by Mergify
parent e1674d2017
commit e0f206243a

View File

@@ -487,10 +487,12 @@ class PaymentRequest(Document):
row_number += TO_SKIP_NEW_ROW
@frappe.whitelist(allow_guest=True)
@frappe.whitelist()
def make_payment_request(**args):
"""Make payment request"""
frappe.has_permission(doctype="Payment Request", ptype="write", throw=True)
args = frappe._dict(args)
ref_doc = frappe.get_doc(args.dt, args.dn)