feat: configuration to allow guest access

This commit is contained in:
Jannat Patel
2025-02-06 12:14:24 +05:30
parent 49631b6e56
commit ba26826896
10 changed files with 55 additions and 13 deletions
+6 -1
View File
@@ -409,7 +409,7 @@ def get_certified_participants(filters=None, start=0, page_length=30, search=Non
return participants
@frappe.whitelist()
@frappe.whitelist(allow_guest=True)
def get_certification_categories():
categories = []
docs = frappe.get_all(
@@ -1220,3 +1220,8 @@ def get_notifications(filters):
notification.update(from_user_details)
return notifications
@frappe.whitelist(allow_guest=True)
def is_guest_allowed():
return frappe.get_cached_value("LMS Settings", None, "allow_guest_access")
@@ -10,6 +10,7 @@
"send_calendar_invite_for_evaluations",
"is_onboarding_complete",
"column_break_zdel",
"allow_guest_access",
"enable_learning_paths",
"unsplash_access_key",
"livecode_url",
@@ -351,12 +352,18 @@
"fieldname": "general_tab",
"fieldtype": "Tab Break",
"label": "General"
},
{
"default": "1",
"fieldname": "allow_guest_access",
"fieldtype": "Check",
"label": "Allow Guest Access"
}
],
"index_web_pages_for_search": 1,
"issingle": 1,
"links": [],
"modified": "2024-11-20 11:55:05.358421",
"modified": "2025-02-06 11:42:29.803207",
"modified_by": "Administrator",
"module": "LMS",
"name": "LMS Settings",
+2 -1
View File
@@ -96,4 +96,5 @@ lms.patches.v2_0.give_discussions_permissions
lms.patches.v2_0.delete_web_forms
lms.patches.v2_0.update_desk_access_for_lms_roles
lms.patches.v2_0.update_quiz_submission_data
lms.patches.v2_0.convert_quiz_duration_to_minutes
lms.patches.v2_0.convert_quiz_duration_to_minutes
lms.patches.v2_0.allow_guest_access #05-02-2025
+5
View File
@@ -0,0 +1,5 @@
import frappe
def execute():
frappe.db.set_single_value("LMS Settings", "allow_guest_access", 1)