Repository navigation
Conversation
|
Thanks for the pull request, @rodmgwgu! 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. |
34bfeaf to
395d02c
Compare
395d02c to
b60f031
Compare

Closes #652
Problem
The role members table in the Administrative Console (openedx/frontend-app-admin-console#294) needs to show scope and org names, but
GET /api/authz/v1/assignments/only returns their keys.Approach
scope_display_nameandorg_display_name. The names are looked up after paging, only for the current page, with one query per resource type: libraries, courses, and orgs.scope_display_namereusesinject_scope_display_names, which the per-user assignments endpoint already uses.get_org_display_name_mapandinject_org_display_namesfor org names. Inactive orgs are included, so existing assignments on them still show a name.*, and deleted libraries, courses, or orgs. An org-level glob such ascourse-v1:Org1+*has no scope name but still gets its org name.Manual testing instructions
As a staff user in the LMS, with a course and a library that have role assignments:
GET /api/authz/v1/assignments/. Each result hasscope_display_nameset to the course or library title andorg_display_nameset to the organization name.lib:<org>:*. Its result has an emptyscope_display_nameand the org's name inorg_display_name.Unit tests:
pytest src/openedx_authz/tests/api/test_utils.py src/openedx_authz/tests/rest_api/admin_console/test_views.py -k "TestGetOrgDisplayNameMap or TestAssignmentsAPIView".Rollback plan
Revert this PR. No migration.
Retro compatibility
Only adds fields to the response. Existing fields are unchanged.
AI Usage
Kiro assisted with the implementation, with human guidance on the decisions, plan and review.
Merge checklist: