|
|
@@ -12,10 +12,10 @@ from frappe import _ |
|
|
|
import frappe.sessions |
|
|
|
|
|
|
|
def get_context(context): |
|
|
|
# if frappe.session.user == "Guest": |
|
|
|
# frappe.throw(_("Log in to access this page."), frappe.PermissionError) |
|
|
|
# elif frappe.db.get_value("User", frappe.session.user, "user_type") == "Website User": |
|
|
|
# frappe.throw(_("You are not permitted to access this page."), frappe.PermissionError) |
|
|
|
if frappe.session.user == "Guest": |
|
|
|
frappe.throw(_("Log in to access this page."), frappe.PermissionError) |
|
|
|
elif frappe.db.get_value("User", frappe.session.user, "user_type") == "Website User": |
|
|
|
frappe.throw(_("You are not permitted to access this page."), frappe.PermissionError) |
|
|
|
|
|
|
|
hooks = frappe.get_hooks() |
|
|
|
try: |
|
|
|