Closed pomegranited closed 7 months ago
Thanks for the pull request, @pomegranited! Please note that it may take us up to several weeks or months to complete a review and merge your PR.
Feel free to add as much of the following information to the ticket as you can:
All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.
Please let us know once your PR is ready for our review and all tests are green.
A few thoughts:
@bradenmacdonald could I get your review here?
@rpenido @pomegranited Are you both happy with this PR and ready for final review + merge from me?
Thanks for your reviews @bradenmacdonald ! I'm going to merge & tag this and get https://github.com/openedx/edx-platform/pull/34004 ready for merge too.
@pomegranited 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future.
Description
Adds "user permissions" to the Tagging REST API to show what permissions the current request.user has on the objects serialized in the response.
Supporting information
Part of https://github.com/openedx/modular-learning/issues/160
Testing instructions
See https://github.com/openedx/frontend-app-course-authoring/pull/787 for manual testing instructions.
Deadline
None
Other information
TO DO (Re comment:)
[x] Please include a test that loads a bunch of taxonomies/tags/objecttags as a non-superuser and makes sure the query count is only increased by at most 1 when permissions are included in the response.
Done, see test_views.py.
[x] Do we want to allow API consumers to choose whether the perms info is included in the REST API responses or not? It's probably simpler to just always include them, unless there is some performance or response size penalty.
I decided to add an
include_perms
parameter which triggers the permission checks. These checks are cheap to run in this library, but users of the library may customize their permissions (like we did with content_tagging) and so the checks may not always be this quick to run.[x] bump version
Private ref: FAL-3577