[refactor] has_website_permission parameters

This commit is contained in:
Rushabh Mehta 2016-10-12 10:31:08 +05:30
parent bb7308bbc1
commit 257bbbe588

View File

@ -14,10 +14,10 @@ def get_context(context):
context.doc.set_indicator()
context.parents = frappe.form_dict.parents
context.payment_ref = frappe.db.get_value("Payment Request",
context.payment_ref = frappe.db.get_value("Payment Request",
{"reference_name": frappe.form_dict.name}, "name")
context.enabled_checkout = frappe.get_doc("Shopping Cart Settings").enable_checkout
if not context.doc.has_website_permission("read"):
if not frappe.has_website_permission(context.doc):
frappe.throw(_("Not Permitted"), frappe.PermissionError)