edx-platform
edx-platform copied to clipboard
feat: add has_course_author_access to CourseHomeMetadataView response [BB-9082]
Description
Adds has_course_author_access
boolean to CourseHomeMetadataView
. Currently it's used to control visibility of the "View as Staff" button here: https://github.com/openedx/frontend-app-learning/pull/1436
Testing
Open any unit in frontend-app-learning
, open Network
tab in your browser console, and search for meta
there. There will be a single request, and its JSON response should contain has_course_author_access
key. It should be False
for all users that don't have access to Studio, especially those having the "Limited Staff" course team role.