From b9a411f93dfcdaeec12cbbfb64ee94e40e0c7f92 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 048f84a33f7d..ae854b888775 100644 --- a/lms/djangoapps/course_home_api/course_metadata/views.py +++ b/lms/djangoapps/course_home_api/course_metadata/views.py @@ -141,6 +141,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()