chore: deprecate content libraries authorization permissions, apis, rest apis and models#38052
chore: deprecate content libraries authorization permissions, apis, rest apis and models#38052BryanttV wants to merge 4 commits intoopenedx:masterfrom
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. |
c7ecdd5 to
52a41e4
Compare
52a41e4 to
d8eb27c
Compare
feanil
left a comment
There was a problem hiding this comment.
Looking for some more clarification, the DEPRs make sense but it would be useful to point to more actionable docs for what to do when you see this warning. Where are the new APIs documented?
| Get the list of users/groups granted permission to use this library. | ||
| """ | ||
| warnings.warn( | ||
| "get_library_team is deprecated. See https://github.com/openedx/openedx-platform/issues/37409.", |
There was a problem hiding this comment.
Pointing to the DEPR is useful but if I saw this, I still wouldn't easily know what api endpoint things would need to switch to. Is there a new equivalent endpoint? Or is there a set of endpoints that I need to use? Is there a quick reference or doc I could look at to know what I should switch to if I've been calling this endpoint?
There was a problem hiding this comment.
Thanks for the feedback! I completely agree. I’ve updated the deprecation messaging, including the replacement of each api method or view.
cf4d974 to
82d43e0
Compare
82d43e0 to
fee0a1a
Compare
Description
This PR deprecates the Content Libraries team roles/permission system backed by the
ContentLibraryPermissionmodel, following OEP-0021.Concretely, this PR:
ContentLibraryPermissionmodel as deprecated via docstring and aDeprecationWarning.DeprecationWarning.openedx/core/djangoapps/content_libraries/api/libraries.pyas deprecated (get_library_team,get_library_user_permissions,set_library_user_permissions,set_library_group_permissions) with aDeprecationWarningon each call.permissions.py(and the re-exports inapi/permissions.py) as deprecated in their module docstrings, in favor of openedx-authz andHasPermissionInContentLibraryScope.ContentLibraryPermissioninline from theContentLibraryDjango admin so new permissions are no longer managed through that model.Supporting information
Deadline
None