Skip to content

Bug - RBAC AuthZ - Course Admin gets 403 when assigning or removing roles on course scopes #273

@wgu-taylor-payne

Description

@wgu-taylor-payne

Description

A Course Admin (non-superadmin) receives a 403 Forbidden error when attempting to assign or remove roles on a course scope via the Admin Console.

Affected endpoints:

  • PUT /api/authz/v1/roles/users/ (assign role)
  • DELETE /api/authz/v1/roles/users/ (remove role)
  • GET /api/authz/v1/roles/ (list roles — also affected)

Steps to Reproduce

  1. Log in as a Course Admin on a specific course (not a superadmin)
  2. Go to Settings > Roles and Permissions
  3. Use the Assign Role button to assign Course Staff to a new user on the course
  4. Observe a 403 error instead of a success toast
  5. Open an existing team member's audit view and click the trash icon to remove their assignment
  6. Observe a 403 error after confirming the deletion

Root Cause

Three issues in the permission layer:

  1. @authz_permissions on the PUT/DELETE/GET methods only listed library permissions (manage_library_team, view_library). The corresponding course permissions (manage_course_team, view_course) were missing.
  2. No CoursePermission class was registered for the course-v1 namespace, so DynamicScopePermission fell back to BaseScopePermission which denies by default.
  3. DynamicScopePermission only read a single scope from requests, but the PUT endpoint now accepts a scopes list for bulk assignment.

Expected Behavior

A Course Admin should be able to assign and remove roles on courses they have management access to, matching the behavior that Library Admins already have on library scopes.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions