feat: use authz permission checks for tagging in course authoring#38436
feat: use authz permission checks for tagging in course authoring#38436wgu-taylor-payne wants to merge 4 commits intoopenedx:masterfrom
Conversation
|
Thanks for the pull request, @wgu-taylor-payne! 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. |
469ddd3 to
f2624a4
Compare
f2624a4 to
6f827e2
Compare
6f827e2 to
88f1560
Compare
There was a problem hiding this comment.
Pull request overview
This PR updates course authoring tagging endpoints to use openedx-authz permission checks (behind AUTHZ_COURSE_AUTHORING_FLAG) while retaining legacy permission behavior for non-course objects, and aligns CMS outline access with AuthZ.
Changes:
- Bump
openedx-coreto0.45.0and relax the corresponding constraints upper bound to<0.46. - Add conditional AuthZ-based permission enforcement for object tagging (view/manage) and serializer permission fields.
- Switch
xblock_outline_handlerread-access checks touser_has_course_permissionwith legacy fallback when AuthZ is disabled, and add AuthZ-focused tests.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| requirements/edx/testing.txt | Bumps openedx-core pin to 0.45.0. |
| requirements/edx/doc.txt | Bumps openedx-core pin to 0.45.0. |
| requirements/edx/development.txt | Bumps openedx-core pin to 0.45.0. |
| requirements/edx/base.txt | Bumps openedx-core pin to 0.45.0. |
| requirements/constraints.txt | Allows openedx-core up to <0.46. |
| openedx/core/djangoapps/content_tagging/rest_api/v1/views.py | Adds AuthZ branching for course object tag view/manage permissions and permission classes. |
| openedx/core/djangoapps/content_tagging/rest_api/v1/serializers.py | Adds AuthZ-backed serializer permission computations for tagging/deleting. |
| openedx/core/djangoapps/content_tagging/auth.py | Adds helper to determine whether to use AuthZ for a given object id/context. |
| openedx/core/djangoapps/content_tagging/rest_api/v1/tests/test_views.py | Adds AuthZ tests for object tag endpoints and updates query-count expectations. |
| cms/djangoapps/contentstore/views/tests/test_block.py | Adds AuthZ tests for outline handler access. |
| cms/djangoapps/contentstore/views/block.py | Uses AuthZ permission check for outline handler, with legacy fallback when AuthZ is disabled. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
09ed8db to
05af5d9
Compare
Description
Use authz permission checks for tagging in course authoring when the
AUTHZ_COURSE_AUTHORING_FLAGflag is enabled.Reopens #38416 (auto-closed when base branch was merged).
Companion openedx-core PR: openedx/openedx-core#550.
Supporting information
Closes #38143.
Adjacent investigation into legacy permissions around tagging: #38222
Permission list: https://openedx.atlassian.net/wiki/spaces/OEPM/pages/5528715266/openedx-authz+permission+list
Testing instructions
Automated tests
Manual tests
authz.enable_course_authoringflag.Deadline
Verawood
Other information
GitHub Copilot with Claude Sonnet 4 was used to aid development.