refactor: split REST API views by domain ownership - #453
mariajgrimaldi wants to merge 2 commits into
Conversation
Moves the five Admin-Console-shaped endpoints (AdminConsoleOrgsAPIView, ScopesAPIView, TeamMembersAPIView, TeamMemberAssignmentsAPIView, AssignmentsAPIView) into a new admin_console/ subpackage, and WaffleFlagStatesAPIView into a new course_authoring/ subpackage, per the ownership and layout rules being recorded in ADR 0016 and ADR 0017. PermissionValidationMeView, RoleUserAPIView, RoleListView, and UserValidationAPIView remain in views.py as generic Authorization endpoints, with no reference to any specific consumer's packaging; that reasoning lives in admin_console/course_authoring's own docstrings and in ADR 0017. No URLs change; tests move alongside their views. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
pylint 4.0.4/astroid 4.0.4 no longer needs the too-many-positional-arguments suppression on these test/model signatures, flagging the old comments as useless-suppression. Also trims trailing blank lines flagged by trailing-newlines, fixes a line-too-long, and drops an unused import in the new admin_console test module. openedx_authz/rest_api/v1/filters.py was left behind, byte-identical and unreferenced, after admin_console/filters.py replaced it in the package layout split (ADR 0017).
|
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. 🔘 Update the status of your PRYour PR is currently marked as a draft. After completing the steps above, update its status by clicking "Ready for Review", or removing "WIP" from the title, as appropriate. Where 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. |
Description
This PR splits the REST API views and tests by domain ownership, following the boundary recorded in ADR 0016. It changes the package layout without changing the API URLs or endpoint behavior.
The Admin Console endpoints now live under
openedx_authz.rest_api.v1.admin_console:AdminConsoleOrgsAPIViewScopesAPIViewTeamMembersAPIViewTeamMemberAssignmentsAPIViewAssignmentsAPIViewTheir filters and tests move with them.
WaffleFlagStatesAPIViewand its tests move underopenedx_authz.rest_api.v1.course_authoring. The shared authorization endpoints, including permission validation and role operations, remain inv1/views.py.This package boundary lets domain-specific behavior stay with the domain that owns it. The course-authoring filter implementation is kept out of this PR and remains in the next layer, #361.
Stack dependency
This PR is stacked on #390, which documents the ownership boundary and cross-domain filter decision. Review and merge #390 first.
Testing
This is a package-layout refactor. The endpoint URLs and behavior remain unchanged, so no separate manual test is needed.
Merge checklist: