fix: throw a permission error
This commit is contained in:
parent
ef6ce2cad7
commit
bcbc529a4e
1 changed files with 1 additions and 1 deletions
|
|
@ -14,7 +14,7 @@ def get_context(context, **dict_params):
|
||||||
if doctype:
|
if doctype:
|
||||||
meta = frappe.get_meta(doctype)
|
meta = frappe.get_meta(doctype)
|
||||||
if frappe.session.user == "Guest" and not meta.allow_guest_to_view:
|
if frappe.session.user == "Guest" and not meta.allow_guest_to_view:
|
||||||
return
|
frappe.throw(_("Login to view"), frappe.PermissionError)
|
||||||
context.meta = meta
|
context.meta = meta
|
||||||
context.update(get_list_context(context, doctype) or {})
|
context.update(get_list_context(context, doctype) or {})
|
||||||
context.update(get(**frappe.local.form_dict))
|
context.update(get(**frappe.local.form_dict))
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue