From 2c0e2ff2322eb5e8cb4871e5dac6074d3486af82 Mon Sep 17 00:00:00 2001 From: Johan Castiblanco Date: Thu, 12 Sep 2024 08:58:20 -0500 Subject: [PATCH] feat: add flag to manage staff see in catalog --- lms/djangoapps/courseware/access.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lms/djangoapps/courseware/access.py b/lms/djangoapps/courseware/access.py index e8bff5d1b1da..f17aa6257f3c 100644 --- a/lms/djangoapps/courseware/access.py +++ b/lms/djangoapps/courseware/access.py @@ -394,6 +394,10 @@ def can_see_in_catalog(): """ return ( _has_catalog_visibility(courselike, CATALOG_VISIBILITY_CATALOG_AND_ABOUT) + or ( + _has_staff_access_to_descriptor(user, courselike, courselike.id) + and getattr(settings, "STAFF_CAN_SEE_IN_CATALOG", False) + ) ) @function_trace('can_see_about_page')