Repository navigation
feat!: remove deprecated course/library aliases from scopes endpoint - #610
Conversation
|
Thanks for the pull request, @BryanttV! 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. |
9ef71b5 to
58c4bee
Compare
GET /api/authz/v1/scopes/ now accepts only scope_type=course-v1 and scope_type=lib. The deprecated course and library aliases are rejected with a validation error, as /roles/ already does. Refs #536 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
58c4bee to
6c6af43
Compare
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
mariajgrimaldi
left a comment
There was a problem hiding this comment.
LGTM! Thanks so much for cleaning this up :)
Description
GET /api/authz/v1/scopes/changed itsscope_typevalues fromcourse/librarytocourse-v1/lib, and kept the old values as deprecated aliases so the change was not breaking while the Admin Console migrated. Now that the Admin Console uses the new values, the aliases are dead code. This PR removes them so the API exposes a single set of values, the same as/roles/.DEPRECATED_SCOPE_TYPE_ALIASES(rest_api/data.py) andScopeTypeAliasField(rest_api/v1/admin_console/serializers.py).scope_typeis now a plainChoiceField.scope_type=courseorscope_type=librarynow return400.course-v1andlibkeep working.scope_typeand the "Scope type naming" section of ADR 0028 so they no longer mention the aliases.courseandlibrary, and moves the two management-permission tests tocourse-v1/lib.Affected roles: Developers and operators calling
/scopes/directly. The Admin Console is not affected once it uses the new values.Supporting Information
scope_typevalues (course-v1/lib) #535Testing Instructions
Authenticate as a user with permission to view team members.
Request
GET /api/authz/v1/scopes/?scope_type=course-v1and verify200with only course scopes.Request
GET /api/authz/v1/scopes/?scope_type=liband verify200with only library scopes.Request
GET /api/authz/v1/scopes/?scope_type=courseand then?scope_type=library. Verify both return400.Run the automated tests:
Deadline
None
Other Information
courseorlibrary. Merge only after the Admin Console migration (Migrate Admin Console to the newscope_typevalues (course-v1/lib) #535) is released.