openedx / openedx/openedx-authz

Fix review endpoints to allow access for users with `courses.view_library_updates` permission

Open
#441 1 comment 0 reactions 1 assignee View on GitHub

@efortish is already working on this.

Since Sep 17, 2026.

  • #3251 by @efortish — open
  • #39107 by @efortish — open
willow
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
  1. Create or use a test user in the system.
  2. Ensure the user does not have the general view permission for a specific library that has pending changes.
  3. Grant this user the courses.view_library_updates permission, by assigning any course role, such as Course Auditor.
  4. Attempt to access the review changes view (or make a direct request to the review endpoints) for that library.
  5. Observe that the system throws a permission error and prevents the user from viewing the changes.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.