test: access to endpoints

This commit is contained in:
Jannat Patel
2026-01-19 15:06:44 +05:30
parent ad90b89d25
commit 3e98d962aa
2 changed files with 38 additions and 3 deletions

View File

@@ -42,14 +42,13 @@ def authenticate():
else:
path = frappe.request.path
user_type = frappe.get_cached_value("User", frappe.session.user, "user_type")
user_type = frappe.db.get_value("User", frappe.session.user, "user_type")
if user_type == "System User":
return
if not path.startswith("/api/"):
return
print("path", path)
if path.startswith("/lms") or path.startswith("/api/method/lms."):
return