From defcb6a3ab8486e3b0927eca9f7e8b095ee449ec Mon Sep 17 00:00:00 2001 From: 0x29a Date: Mon, 9 Sep 2024 11:46:08 +0200 Subject: [PATCH] docs: explain why specifying 'cms' service --- lms/djangoapps/course_home_api/course_metadata/views.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lms/djangoapps/course_home_api/course_metadata/views.py b/lms/djangoapps/course_home_api/course_metadata/views.py index 60b7241da35d..7ad2a2537000 100644 --- a/lms/djangoapps/course_home_api/course_metadata/views.py +++ b/lms/djangoapps/course_home_api/course_metadata/views.py @@ -140,6 +140,11 @@ def get(self, request, *args, **kwargs): 'can_view_certificate': certificates_viewable_for_course(course), 'course_modes': course_modes, 'is_new_discussion_sidebar_view_enabled': new_discussion_sidebar_view_is_enabled(course_key), + # We check the course author access in the context of CMS here because this field is used + # to determine whether the user can access the course authoring tools in the CMS. + # This is a temporary solution until the course author role is split into "Course Author" and + # "Course Editor" as described in the permission matrix here: + # https://github.com/openedx/platform-roadmap/issues/246 'has_course_author_access': has_course_author_access(request.user, course_key, 'cms'), } context = self.get_serializer_context()