From 06638834ef08828cbeda28df29cb9d525d111836 Mon Sep 17 00:00:00 2001 From: andrey-canon Date: Tue, 19 Nov 2024 17:51:22 -0500 Subject: [PATCH] feat: remove staff access for catalog views --- lms/djangoapps/courseware/access.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lms/djangoapps/courseware/access.py b/lms/djangoapps/courseware/access.py index 74f1d74f837f..c06f1ac52a68 100644 --- a/lms/djangoapps/courseware/access.py +++ b/lms/djangoapps/courseware/access.py @@ -394,7 +394,10 @@ def can_see_in_catalog(): """ return ( _has_catalog_visibility(courselike, CATALOG_VISIBILITY_CATALOG_AND_ABOUT) - or _has_staff_access_to_block(user, courselike, courselike.id) + or ( + _has_staff_access_to_block(user, courselike, courselike.id) + and getattr(settings, "STAFF_CAN_SEE_IN_CATALOG", True) + ) ) @function_trace('can_see_about_page')