blob: 1bcfce2bb43b32715b8e3c881c5754f016664780 [file] [log] [blame]
Kanchan Chauhan2e8cc892016-02-19 17:27:23 +05301# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
2# License: GNU General Public License v3. See license.txt
3
4from __future__ import unicode_literals
5import frappe
6
7from frappe import _
8
9def get_context(context):
10 context.no_cache = 1
11 context.doc = frappe.get_doc(frappe.form_dict.doctype, frappe.form_dict.name)
12 context.parents = frappe.form_dict.parents
13
14 if not context.doc.has_website_permission("read"):
15 frappe.throw(_("Not Permitted"), frappe.PermissionError)
16