From 9f6f717585a863280c8e06790c27c5c371596db4 Mon Sep 17 00:00:00 2001 From: Jannat Patel Date: Mon, 16 Feb 2026 12:18:41 +0530 Subject: [PATCH 1/8] fix: discussions reply endpoint permission check --- lms/lms/utils.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lms/lms/utils.py b/lms/lms/utils.py index 56739992..6862abf6 100644 --- a/lms/lms/utils.py +++ b/lms/lms/utils.py @@ -1669,8 +1669,10 @@ def create_discussion_topic(doctype: str, docname: str) -> str: @frappe.whitelist() def get_discussion_replies(topic: str): - doctype = frappe.db.get_value("Discussion Topic", topic, "reference_doctype") - if not can_access_topic(doctype, topic): + topic_details = frappe.db.get_value( + "Discussion Topic", topic, ["reference_doctype", "reference_docname"], as_dict=1 + ) + if not can_access_topic(topic_details.reference_doctype, topic_details.reference_docname): frappe.throw(_("You are not authorized to view the discussion replies for this topic.")) replies = frappe.get_all( From eba1815390f443867616c39dabc5b7796f03500c Mon Sep 17 00:00:00 2001 From: Jannat Patel Date: Mon, 16 Feb 2026 18:05:53 +0530 Subject: [PATCH 2/8] fix: permission issues when adding new members --- .../src/components/Controls/Autocomplete.vue | 7 +- frontend/src/components/CourseCardOverlay.vue | 2 +- frontend/src/components/Settings/Members.vue | 59 +- .../src/pages/Courses/CourseDashboard.vue | 3 +- .../pages/Courses/CourseEnrollmentModal.vue | 2 + frontend/yarn.lock | 1259 ++++++++--------- lms/auth.py | 1 + lms/install.py | 41 +- .../doctype/lms_enrollment/lms_enrollment.py | 10 +- lms/patches.txt | 4 +- lms/patches/v2_0/give_user_list_permission.py | 5 + lms/patches/v2_0/share_enrollment.py | 20 + 12 files changed, 739 insertions(+), 674 deletions(-) create mode 100644 lms/patches/v2_0/give_user_list_permission.py create mode 100644 lms/patches/v2_0/share_enrollment.py diff --git a/frontend/src/components/Controls/Autocomplete.vue b/frontend/src/components/Controls/Autocomplete.vue index dee1268f..2d3cea03 100644 --- a/frontend/src/components/Controls/Autocomplete.vue +++ b/frontend/src/components/Controls/Autocomplete.vue @@ -16,7 +16,12 @@