fix: show doctypes with guest view
This commit is contained in:
parent
c1e6f66fb9
commit
ef6ce2cad7
1 changed files with 4 additions and 3 deletions
|
|
@ -8,13 +8,14 @@ from frappe.www.list import get_list_context, get_list_data
|
|||
|
||||
|
||||
def get_context(context, **dict_params):
|
||||
if frappe.session.user == "Guest":
|
||||
raise frappe.PermissionError
|
||||
frappe.local.form_dict.update(dict_params)
|
||||
context.show_sidebar = True
|
||||
doctype = frappe.local.form_dict.doctype
|
||||
if doctype:
|
||||
context.meta = frappe.get_meta(doctype)
|
||||
meta = frappe.get_meta(doctype)
|
||||
if frappe.session.user == "Guest" and not meta.allow_guest_to_view:
|
||||
return
|
||||
context.meta = meta
|
||||
context.update(get_list_context(context, doctype) or {})
|
||||
context.update(get(**frappe.local.form_dict))
|
||||
context.home_page = "/portal"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue