You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Reindex button hidden for non-Global-Staff users with valid AuthZ course-authoring permissions #482
The visibility of the "Reindex" button in Studio's course outline (course-authoring MFE) is controlled by the reindex_link field returned by CourseIndexView, computed in _get_course_index_context. This check is hardcoded to GlobalStaff only, regardless of whether the AuthZ course-authoring flag (authz.enable_course_authoring) is enabled and regardless of the requesting user's AuthZ permissions.
Meanwhile, the actual reindex action (course_search_index_handler → reindex_course_and_check_access in cms/djangoapps/contentstore/views/course.py) already supports AuthZ: when the flag is enabled, it grants access based on the COURSES_PUBLISH_COURSE_CONTENT permission, which non-Global-Staff roles (e.g. course_staff, course_admin) can hold.
This mismatch means a user who is authorized to trigger a reindex (via AuthZ) never sees the button that would let them do it from the UI.
Current behavior
With ENABLE_COURSEWARE_INDEX on and the AuthZ course-authoring flag enabled, a user with the course_staff (or course_admin) AuthZ role — but who is not Global Staff — does not see the "Reindex" button in the Course Outline page, even though they could successfully trigger a reindex by hitting the search_reindex endpoint directly.
Only Global Staff (superusers) ever see the button, regardless of AuthZ state.
Expected behavior
The "Reindex" button's visibility should be governed by the same access rules as the reindex action itself: when AuthZ course-authoring is enabled, any user holding COURSES_PUBLISH_COURSE_CONTENT for the course should see the button; when AuthZ is disabled, the legacy Global-Staff-only restriction should still apply.
Steps to reproduce
Enable ENABLE_COURSEWARE_INDEX in CMS.
Enable the authz.enable_course_authoring waffle flag (globally or for the target course).
Assign a non-Global-Staff user the course_staff AuthZ role in a course.
Log in to Studio as that user and open the course's Course Outline page.
Observe that the Reindex button is not shown, even though a GET to /course/{course_id}/search_reindex as that user succeeds
Activity