Skip to content

Split learner grading permissions and add Instructor Dashboard dependencies #660

Done

Description

@BryanttV

Description

The review of the Grading tab enforcement (openedx/openedx-platform#39366) showed that the current Instructor Dashboard permissions cannot express two things: who may run grading operations on all learners, and which permission covers each endpoint shared by several tabs. The agreed solution requires changes to the permission definitions in openedx-authz: split the grading permission, add a permission to view a learner's course status, widen View course info, and declare dependencies between permissions.

Current Behavior

  • courses.manage_learner_grading covers both Single Learner and All Learners operations, and is granted to course_admin and course_staff. With authz.enable_course_authoring enabled, enforcing it lets Course Staff reset attempts and rescore for all learners, which the legacy rules reserve for instructor access.
  • No permission specifically covers viewing a learner's course status (LearnerView), which the Grading, Date Extensions, and Special Exams tabs all use.
  • courses.view_course_info is described as "View general course information and enrollment counts in the Instructor Dashboard". It does not cover background task status (ListInstructorTasks), which several tabs use.
  • The Instructor Dashboard permissions declare no dependencies, so a custom role can include a permission without the ones its workflow needs.

Expected Behavior

Grading permissions

courses.manage_learner_grading is replaced by two permissions:

Permission Covers course_admin course_staff
courses.manage_learner_grades Single Learner operations Yes Yes
courses.manage_bulk_learner_grades All Learners operations Yes No

Shared endpoints

Each endpoint in openedx-platform checks the one permission that matches its functionality. There are no OR checks based on which tabs use the endpoint, so the default roles must include every permission their workflows need.

Endpoint Permission
LearnerView courses.view_learner_course_status (new, shared by Grading, Date Extensions, and Special Exams)
ProblemView courses.manage_learner_grades
ListInstructorTasks courses.view_course_info, which now also covers background task status

Permission dependencies

Custom roles cannot include a permission without the permissions it depends on:

Permission Depends on
courses.manage_learner_grades courses.view_learner_course_status
courses.manage_learner_extensions courses.view_learner_course_status
courses.manage_bulk_learner_grades courses.manage_learner_grades
courses.view_gradebook courses.view_course_info

Acceptance Criteria

  • courses.manage_learner_grades is defined for Single Learner operations and granted to course_admin and course_staff.
  • courses.manage_bulk_learner_grades is defined for All Learners operations and granted to course_admin, but not to course_staff.
  • courses.manage_learner_grading is removed from the schema, constants, public exports, tests, and docs.
  • courses.view_learner_course_status is defined with the course-v1 scope and granted to course_admin and course_staff.
  • The description of courses.view_course_info includes background task status.
  • The grading permission descriptions no longer claim to cover viewing learner progress or checking task status, which now belong to courses.view_learner_course_status and courses.view_course_info.
  • The four dependencies in the table above are declared with depends_on in schema version 1.1 files (ADR 0034).
  • course_admin and course_staff pass the schema validation that requires a role to include all direct and indirect dependencies of its permissions.
  • A role that has only courses.manage_bulk_learner_grades and its dependencies includes courses.manage_learner_grades and courses.view_learner_course_status.
  • Running load_authz_schema on an existing installation adds the new policies and removes the ones for courses.manage_learner_grading.
  • The new permissions have Python constants exported from openedx_authz.authz and openedx_authz.constants.permissions.
  • Tests cover the role grants (including the Course Staff denial for bulk operations) and the dependencies.
  • course_roles.rst, compiled-schema.yaml, and the CHANGELOG are updated. The CHANGELOG notes the removed permission and, for custom roles that grant it, the load_authz_schema --drop-custom-role-permissions option.
  • The package version is released so that openedx-platform can upgrade to it.

Out of Scope

Dependencies

Technical Notes

  • Grading definitions are in src/openedx_authz/applets/learner_grading/ (schema/permissions.yaml, schema/role_extensions.yaml, constants.py).
  • view_course_info and manage_learner_extensions are in src/openedx_authz/applets/learner_administration/.
  • The agreement does not say which applet or permission category should own courses.view_learner_course_status. Choose one following ADR 0032.
  • Some dependencies cross applets (for example, view_gradebook depends on view_course_info).
  • Expected role grants are also listed in src/openedx_authz/tests/role_permissions.py.
  • In openedx-platform, the new permissions also need legacy equivalents in LEGACY_PERMISSION_CHECKS. All Learners operations must keep requiring instructor access there.

Related Issues

Notes or Additional Context

Activity

  1. self-assigned this
    on Nov 26, 2026
  2. moved this to Ready for Development in RBAC AuthZ Boardon Nov 26, 2026
  3. moved this from Ready for Development to In Review in RBAC AuthZ Boardon Nov 26, 2026
  4. added
    willow
    on Nov 26, 2026
  5. moved this from In Review to Done in RBAC AuthZ Boardon Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

willow

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions