Repository navigation
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 @@
## master #262 +/- ##
==========================================
+ Coverage 98.55% 98.60% +0.04%
==========================================
Files 80 84 +4
Lines 1385 1430 +45
Branches 468 476 +8
==========================================
+ Hits 1365 1410 +45
Misses 19 19
Partials 1 1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
f550481 to
d355afd
Compare
7eb0833 to
d9cd96d
Compare
| * While the icon loads, and when the name is unknown, it renders an empty icon of the same size, so | ||
| * the layout doesn't shift. When the catalog sends no icon, it renders nothing. | ||
| */ | ||
| const CatalogIcon = ({ name, ...iconProps }: CatalogIconProps) => { |
There was a problem hiding this comment.
Note
There was a recent review at the backend openedx/openedx-authz#537 (comment) and we are going to use a set of icon names agreed between the front and the backend, so at the front side we will have a map of icons.
We could still review this and subsequent PRs, understanding that once the set of icons are defined it only affects this file and not consumers.
Fetch the roles, permissions and categories catalog of the scope types the user can view, slice it by scope type, order its roles by permission count, and render its icons by name with CatalogIcon. Nothing consumes it yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
629b048 to
8cb1f97
Compare
Summary
Add a shared AuthZ catalog feature that prepares the Admin Console to consume backend-defined roles, permissions, and categories.
How it works:
The feature provides:
useAuthzCatalog, with shared caching and stable per-scope catalogs.CatalogIcon, which loads Paragon icons by name and preserves spacing when an icon is loading or unknown.This PR introduces the catalog infrastructure only. Existing screens do not consume it yet.
Depends on openedx/openedx-authz#510, available in
openedx-authz==2.0.0.Evidence
Before: Roles, permissions, and categories are hardcoded in the frontend.
After: A reusable catalog module can retrieve these definitions from the backend for future screen migrations.
Added tests cover permission-based fetching, pagination, scope filtering, stable catalog references, role ordering, and icon rendering.
Test instructions
From the PR branch, install dependencies and run:
npm ci npm test -- --watch=false --runInBand src/authz-module/catalog npm run types npm run lintVerify that the catalog tests cover:
Run the full regression suite:
npm test -- --watch=false --runInBandNo visible UI change is expected because screen integration will follow in subsequent PRs. If you want to try the integration in a small component test #263 or if yuo want to tes the full implementation check #270
AI disclosure
Code assisted by Claude