Repository navigation
feat(authz): name roles from the catalog - #270
Conversation
|
Thanks for the pull request, @dcoa! 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. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dcoa/catalog-7-remove-hardcoded #270 +/- ##
================================================================
Coverage 98.95% 98.96%
================================================================
Files 78 78
Lines 1442 1453 +11
Branches 474 476 +2
================================================================
+ Hits 1427 1438 +11
Misses 15 15 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
cfc556e to
c8eb331
Compare
c8eb331 to
9f6cc24
Compare
9f6cc24 to
ca26803
Compare
720f66e to
a947f0e
Compare
a947f0e to
b65c143
Compare
b65c143 to
4f505a8
Compare
4f505a8 to
b662e6e
Compare
b662e6e to
8b67f59
Compare
427b88c to
2bc77f8
Compare
2bc77f8 to
dade3e5
Compare
Remove MAP_ROLE_KEY_TO_LABEL. The role cells take the role names from the catalog through a new getRole lookup on useAuthzCatalog, and fall back to the role id. The Django managed roles, which the catalog doesn't describe, get translated names, and global staff uses the django.staff key the backend sends. The row highlight of those roles matches their id instead of their name, so it works in every language. Co-Authored-By: Claude Opus 5.5 <[email protected]>
dade3e5 to
0eeaf7b
Compare
|
🎉 This PR is included in version 1.0.0-alpha.13 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Summary
Display role names from the AuthZ catalog in assignment tables, role badges, and removal dialogs.
getRole(roleId)touseAuthzCatalogfor shared role lookups.MAP_ROLE_KEY_TO_LABELmapping.Affects role labels, removal-dialog names, and Django-managed role identification and highlighting. Depends on the preceding catalog cleanup in #269.
Closes openedx/openedx-authz#415
Evidence
Before: Role names come from a fixed frontend mapping, and Global Staff uses the outdated
django.globalstaffidentifier.After: Catalog roles display their backend-defined names, unknown roles remain identifiable by ID, and Django-managed roles use translated labels and the correct identifiers.
Tests cover role lookup, unknown-role fallbacks, catalog names in table cells and badges, and Django-managed role labels.
Test instructions
Manually verify: