Skip to content

Add authz validation for courses.manage_pages_and_resources to ProctoredExamSettingsView #443

Closed
openedx/openedx-platform
#39196

Description

@BryanttV

Description

On the backend side, the ProctoredExamSettingsView (handling both GET and POST requests) currently lacks authorization validation. It needs to be updated to enforce the courses.view_pages_and_resources permission for GET requests, and the courses.manage_pages_and_resources permission for POST requests. This will secure the endpoint and bring it in line with its sibling view, ProctoringErrorsView (used for the advanced settings page), which already implements the correct authorization checks.

Expected Behavior

When a user makes a request to the ProctoredExamSettingsView endpoint, the backend should verify if the user has the appropriate permission based on the HTTP method:

  • GET requests: Verify the courses.view_pages_and_resources permission.
  • POST requests: Verify the courses.manage_pages_and_resources permission.

If they have the required permission, the request should proceed normally. If they do not, the backend must block the request and return an HTTP 403 Forbidden error.

Current Behavior

ProctoredExamSettingsView is missing the authz validation check. Because of this, a user who lacks the proper permissions could potentially access (missing courses.view_pages_and_resources) or modify (missing courses.manage_pages_and_resources) the proctored exam settings by bypassing the UI and making direct API calls (GET or POST) to this endpoint.

Activity

  1. moved this to Ready for Development in RBAC AuthZ Boardon Sep 10, 2026
  2. changed the title [-]Add authz validation for `courses.manage_pages_and_resources` to `ProctoredExamSettingsView**`[/-] [+]Add authz validation for `courses.manage_pages_and_resources` to `ProctoredExamSettingsView[/+] on Sep 15, 2026
  3. changed the title [-]Add authz validation for `courses.manage_pages_and_resources` to `ProctoredExamSettingsView[/-] [+]Add authz validation for `courses.manage_pages_and_resources` to `ProctoredExamSettingsView`[/+] on Sep 15, 2026
  4. BryanttV commented on Oct 5, 2026

    @BryanttV
    ContributorAuthor

    While reviewing the issue details, I realized we should separate the permissions based on the type of action. For GET requests (which are read-only), it makes more sense to require the courses.view_pages_and_resources permission, leaving courses.manage_pages_and_resources exclusively for POST requests. I've updated the description to reflect this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

willowReleased in Willow

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions