Skip to content

feat!: replace Paragon icon names with an Open edX AuthZ icon set - #669

Open
BryanttV wants to merge 2 commits into
mainfrom
bav/authz-icon-set
Open

BryanttV wants to merge 2 commits into
mainfrom
bav/authz-icon-set

Conversation

@BryanttV

@BryanttV BryanttV commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Description

The icon field 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-authz owns a fixed, documented set of icon identifiers, and each client maps them to the icons it renders.

  • Adds AUTHZ_ICONS in openedx_authz/constants/icons.py: 154 identifiers from both tabs of the icon proposal sheet.
  • Identifiers use snake_case and drop Paragon's Icon suffix (RemoveRedEye → remove_red_eye, MenuIcon → menu).
  • The JSON Schema checks the format, and semantic validation checks that the value is in the set. Both report errors, so an unknown value still stops the deployment.
  • Removes the copied Paragon list, scripts/generate_paragon_icons.py, and the paragon_icons and paragon_icons_check make targets.
  • Updates the built-in schema files and the compiled schema snapshot.
  • Documents the set in a new reference page, docs/references/icons.rst. A test keeps its identifiers in step with the constant.
  • Adds ADR 0039, which supersedes ADR 0029, with addenda to ADRs 0017, 0018, 0020, 0028 and 0029.

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

  1. Run the tests:

    uv run pytest
  2. In an environment with this branch installed and migrated, deploy the built-in schema from the LMS shell:

    ./manage.py lms load_authz_schema --dry-run
    ./manage.py lms load_authz_schema

    Both commands should succeed. If the previous schema was already applied, the report should list icon updates to the stored definitions.

  3. Request GET /api/authz/v1/roles/?scope=course-v1 as a user who can view roles. The icon values should be identifiers such as remove_red_eye, or null.

  4. In a directory listed in OPENEDX_AUTHZ_SCHEMA_DIRECTORIES, or through the openedx-authz-schema Tutor patch, add this schema file:

    schema_version: "1.0"
    priority: 200
    
    role_extensions:
      - role_id: course_editor
        icon: RemoveRedEye
  5. Run load_authz_schema --dry-run. It should fail with a format error for icon.

  6. Change the value to not_a_real_icon and run it again. It should fail with is not in the Open edX AuthZ icon set.

  7. Change the value to remove_red_eye and run it again. It should succeed.

Deadline

Willow

Other Information

  • Release coordination: the Admin Console needs to map the new identifiers to icons, with a default icon for unknown values. That work belongs to frontend-app-admin-console and 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.
  • There are no database migrations. The next load_authz_schema run updates the stored icons of the built-in definitions.
  • schema_version stays 1.0. ADR 0039 records this decision.
  • ADR 0039 is in Draft status, while this PR already marks ADR 0029 as superseded.

Merge checklist:
Check off if complete or not applicable:

  • Documentation updated (not only docstrings)
  • Fixup commits are squashed away
  • Unit tests added/updated
  • Manual testing instructions provided
  • Noted any: Concerns, dependencies, migration issues, deadlines, tickets

@openedx-webhooks openedx-webhooks added open-source-contribution PR author is not from Axim or 2U core contributor PR author is a Core Contributor (who may or may not have write access to this repo). labels Nov 30, 2026
@openedx-webhooks

openedx-webhooks commented Nov 30, 2026 •

Copy link
Copy Markdown

Thanks for the pull request, @BryanttV!

This repository is currently maintained by @openedx/committers-openedx-authz.

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 approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.
🔘 Provide context

To 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:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads
🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

Details
Where 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:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@github-project-automation github-project-automation Bot moved this to Needs Triage in Contributions Nov 30, 2026
@BryanttV
BryanttV marked this pull request as ready for review November 30, 2026 02:09
@BryanttV BryanttV linked an issue Nov 30, 2026 that may be closed by this pull request
5 tasks

@rodmgwgu rodmgwgu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this!, looking pretty good, just added some comments for consideration.

Comment thread docs/references/icons.rst Outdated
* - Identifier
- Suggested use
* - ``arrow_back``
- Go back to the previous page/view

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that CollectionsBookmark and LibraryBooks both became library_books. I think we should keep both.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Group and Groups both became group. I think we should keep both variants.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, we should have also a singular 'group' icon to differentiate them.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Calendar and Event both became calendar. I think we should keep both as they are different.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
@BryanttV
BryanttV requested a review from rodmgwgu December 2, 2026 18:37
…n examples

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@rodmgwgu rodmgwgu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing my comments, LGTM!, just make sure to synchronize with frontend changes before merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core contributor PR author is a Core Contributor (who may or may not have write access to this repo). open-source-contribution PR author is not from Axim or 2U

Projects

Status: In Eng Review

Development

Successfully merging this pull request may close these issues.

Replace Paragon icon names with an Open edX AuthZ icon set

3 participants