Pārlūkot izejas kodu

fix: uncomment conditions that handle guest access for desk

version-14
prssanna pirms 4 gadiem
vecāks
revīzija
aa8f7cc3c5
1 mainītis faili ar 4 papildinājumiem un 4 dzēšanām
  1. +4
    -4
      frappe/www/app.py

+ 4
- 4
frappe/www/app.py Parādīt failu

@@ -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:


Notiek ielāde…
Atcelt
Saglabāt