Repository navigation
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. |
rodmgwgu
left a comment
There was a problem hiding this comment.
Thanks for this!, looking pretty good, just added some comments for consideration.
| * - Identifier | ||
| - Suggested use | ||
| * - ``arrow_back`` | ||
| - Go back to the previous page/view |
There was a problem hiding this comment.
I find this confusing, because all the icons here will be used for representing concepts related to authorization over parts of the system, not actual UI elements.
Perhaps we should change these suggested uses to something more relevant?
Also, it would be nice to have an example of the actual icon, with the knowledge that it may vary between frontend implementations, but to have an example to follow even on frontend implementations. We can use the current ParagonIcons as proposed by María de los Ángeles.
There was a problem hiding this comment.
Reworded the table as what each identifier represents in authorization terms and added a Paragon example column.
| display_name: Library | ||
| description: Permissions related to viewing, managing, and publishing the library structure and metadata. | ||
| icon: CollectionsBookmark | ||
| icon: library_books |
There was a problem hiding this comment.
I see that CollectionsBookmark and LibraryBooks both became library_books. I think we should keep both.
There was a problem hiding this comment.
Added collections_bookmark for the library category; library_books stays for library updates.
| display_name: Team | ||
| description: Permissions for viewing and managing users who have access to the library. | ||
| icon: Group | ||
| icon: groups |
There was a problem hiding this comment.
Group and Groups both became group. I think we should keep both variants.
There was a problem hiding this comment.
Added a singular group icon, used for the library team; groups stays for cohorts.
| display_name: Course team | ||
| description: Permissions for viewing course team members and managing course role assignments. | ||
| icon: Group | ||
| icon: groups |
There was a problem hiding this comment.
Same here, we should have also a singular 'group' icon to differentiate them.
There was a problem hiding this comment.
Course team now uses the singular group icon.
| display_name: Learner extensions | ||
| description: Permissions for viewing and managing individual due date extensions from the Date Extensions tab in the Instructor Dashboard. | ||
| icon: Event | ||
| icon: calendar |
There was a problem hiding this comment.
Calendar and Event both became calendar. I think we should keep both as they are different.
There was a problem hiding this comment.
Added event for learner extensions; calendar stays for schedule and details.
The icon field of permission categories, permissions, roles and role extensions now takes an identifier from a set this repository owns (openedx_authz.constants.icons.AUTHZ_ICONS), so schema validation no longer depends on Paragon. The set holds the 154 icons of the icon proposal, in snake_case. Unknown values fail validation, as before. The copied Paragon list, its generator script and the paragon_icons make targets are removed, the built-in schemas use the new identifiers, and ADR 0039 supersedes ADR 0029. BREAKING CHANGE: schema files that use Paragon icon names, such as RemoveRedEye, fail validation. Use the identifier from the icon set, such as remove_red_eye. The role catalog API returns the new identifiers. Refs: #651 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
e6b10c2 to
2b00a91
Compare
…n examples Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2b00a91 to
28ff095
Compare
rodmgwgu
left a comment
There was a problem hiding this comment.
Thanks for addressing my comments, LGTM!, just make sure to synchronize with frontend changes before merging.
Description
The
iconfield of permission categories, permissions, roles and role extensions had to be a Paragon icon name, checked against a copy of Paragon's icon list stored in this repository. That coupled the backend to a frontend library, and no single repository decides which Paragon version a site uses.With this PR,
openedx-authzowns a fixed, documented set of icon identifiers, and each client maps them to the icons it renders.AUTHZ_ICONSinopenedx_authz/constants/icons.py: 154 identifiers from both tabs of the icon proposal sheet.snake_caseand drop Paragon'sIconsuffix (RemoveRedEye→remove_red_eye,MenuIcon→menu).scripts/generate_paragon_icons.py, and theparagon_iconsandparagon_icons_checkmake targets.docs/references/icons.rst. A test keeps its identifiers in step with the constant.Breaking change: schema files that use Paragon names now fail validation, so plugin authors and operators must update them before upgrading. The role catalog API keeps the same response format but returns the new identifiers.
Affected roles: Developer (plugin and extension authors), Operator.
Supporting Information
Testing Instructions
Run the tests:
In an environment with this branch installed and migrated, deploy the built-in schema from the LMS shell:
Both commands should succeed. If the previous schema was already applied, the report should list icon updates to the stored definitions.
Request
GET /api/authz/v1/roles/?scope=course-v1as a user who can view roles. Theiconvalues should be identifiers such asremove_red_eye, ornull.In a directory listed in
OPENEDX_AUTHZ_SCHEMA_DIRECTORIES, or through theopenedx-authz-schemaTutor patch, add this schema file:Run
load_authz_schema --dry-run. It should fail with a format error foricon.Change the value to
not_a_real_iconand run it again. It should fail withis not in the Open edX AuthZ icon set.Change the value to
remove_red_eyeand run it again. It should succeed.Deadline
Willow
Other Information
frontend-app-admin-consoleand is not part of this PR, so Replace Paragon icon names with an Open edX AuthZ icon set #651 should stay open until it is done.load_authz_schemarun updates the stored icons of the built-in definitions.schema_versionstays1.0. ADR 0039 records this decision.Merge checklist:
Check off if complete or not applicable: