openedx / openedx/openedx-authz
Fix review endpoints to allow access for users with `courses.view_library_updates` permission
@efortish is already working on this.
Since Sep 17, 2026.
- Dominant language
- Python
- Stars
- 0
- Forks
- 9
- Avg merge
- 13d 9h
- Merged PRs (30d)
- 9
Description
Description
It is necessary to review and fix the endpoints corresponding to the review of changes in the Library updates page in Course Authoring. Currently, these endpoints prevent certain users from viewing pending changes if they lack read permissions on the library. The goal is to ensure that any user with the courses.view_library_updates permission can access and review the changes, replicating a similar logic and solution previously applied to the sync endpoint (https://github.com/openedx/openedx-authz/issues/419)
Expected Behavior
A user with the courses.view_library_updates permission should be able to execute the review endpoints and view the information correctly (e.g., an HTTP 200 response), regardless of whether they have the general view permission for that library.
Current Behavior
The review endpoints are failing and blocking access (likely returning an HTTP 403 Forbidden error) when a user attempts to review changes without having the view permission on the library, even though the user does possess the courses.view_library_updates permission.
Affected Endpoints
/api/libraries/v2/containers/<library_unit_id>/children/?published=true/api/libraries/v2/containers/<library_unit_id>//xblocks/v2/lb:Demo:L1:html:92963022-f922-460c-8950-f3887591035b/embed/student_view/?version=published
Content
Reported in https://github.com/openedx/openedx-authz/issues/286#issuecomment-5504726177
Steps to reproduce
- Create or use a test user in the system.
- Ensure the user does not have the general
viewpermission for a specific library that has pending changes. - Grant this user the
courses.view_library_updatespermission, by assigning any course role, such as Course Auditor. - Attempt to access the review changes view (or make a direct request to the review endpoints) for that library.
- Observe that the system throws a permission error and prevents the user from viewing the changes.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.