Repository navigation
feat: add Instructor Dashboard permissions - #552
mariajgrimaldi wants to merge 1 commit into
Conversation
|
Thanks for the pull request, @mariajgrimaldi! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. DetailsWhere can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
bb5a102 to
815967f
Compare
815967f to
66044f3
Compare
35a5429 to
c197ec3
Compare
c197ec3 to
0fb3a2c
Compare
0fb3a2c to
4874519
Compare
4874519 to
ee87224
Compare
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ee87224 to
40d1a39
Compare
Description
Issue #484 asks for permissions for the Instructor Dashboard, which brings together several areas of course administration. Following the ownership rules in ADR 0032, each permission goes to the applet for the bounded context that owns its action or data, so this PR adds three applets:
enrollmentsfor viewing enrollments and enrolling or unenrolling learners;learner_gradingfor the gradebook and the grading tools for individual learners;learner_administrationfor course information, learner extensions, and cohorts.Each applet defines its permissions and categories in YAML and adds them to
course_adminandcourse_staffthrough role extensions, andopenedx_authz.constants.permissionsre-exports their constants, so clients import them from the same module as the other permissions.The dashboard also checks three existing Course Authoring permissions,
courses.view_course_team,courses.manage_course_team, andcourses.view_grading_settings, which this PR leaves unchanged.The new permissions exist only in the YAML schema, so they reach Casbin through
load_authz_schema, which #538 makes the only source of static policies.Testing instructions
tutor dev run lms ./manage.py lms load_authz_schema --dry-runand check that the "Casbin policies" section adds a row for each of the ten newcourses.*permissions for bothcourse_adminandcourse_staff.--dry-run.course_staffto a user in a course, then opentutor dev run lms ./manage.py lms shelland check thatis_user_allowed(username, "courses.view_gradebook", course_key)fromopenedx_authz.apireturnsTruefor that user andFalsefor a user without a role in the course.Merge checklist:
Check off if complete or not applicable: