fix: sidebar settings issue if guest access was not allowed

This commit is contained in:
Jannat Patel
2026-02-24 12:36:46 +05:30
parent c5145c6c24
commit 2198adf902
2 changed files with 3 additions and 9 deletions

View File

@@ -395,7 +395,7 @@ def get_all_users():
@frappe.whitelist(allow_guest=True)
def get_sidebar_settings():
lms_settings = frappe.get_single("LMS Settings")
if not lms_settings.allow_guest_access:
if frappe.session.user == "Guest" and not lms_settings.allow_guest_access:
return []
sidebar_items = frappe._dict()