Repository navigation
Add the permissions step to the create custom role wizard - #295
Conversation
|
Thanks for the pull request, @jacobo-dominguez-wgu! 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. |
c6baf50 to
682e8a5
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #295 +/- ##
==========================================
+ Coverage 99.16% 99.22% +0.05%
==========================================
Files 103 110 +7
Lines 1923 2062 +139
Branches 620 658 +38
==========================================
+ Hits 1907 2046 +139
Misses 16 16 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
682e8a5 to
15c8e7b
Compare
rodmgwgu
left a comment
There was a problem hiding this comment.
Looking pretty good so far, I'm posting my findings so far. Thanks!
c6517b8 to
a3c22c5
Compare
a3c22c5 to
3ad02d3
Compare
| * Second step of the create custom role wizard: the permissions of the role as a matrix of | ||
| * collapsible categories, beside a summary of what is enabled. | ||
| */ | ||
| const PermissionsStep = ({ categories, permissions, selection }: PermissionsStepProps) => { |
There was a problem hiding this comment.
Since this component will be reused on role detail/permissions tab should we move it outside roles-permissions folder? and probably rename it to PermissionsList since in role detail is no longer a "step"🤔
There was a problem hiding this comment.
Agreed, it shouldn't be called a "step" once role detail uses it, so PermissionsList sounds good, but instead of moving it to the root components folder I would go with merging ../authz-module/roles-permissions/ and ../authz-module/role-detail/ into single folder ../authz-module/roles/ (name TBD):
authz-module/
└── roles/ # ← roles-permissions + role-detail (name TBD)
├── index.ts # RolesPermissionsTable, CreateCustomRole, role-detail tabs
├── RolesPermissionsTable.tsx
├── components/ # atoms shared inside the feature, no index.ts
├── permissions-list/ # PermissionsList + matrix pieces + selection hook, with index.ts
├── create-role/ # CreateCustomRole, NameAndResourceStep, customRoleDraft
├── role-detail/ # members/, permissions/ (RolePermissionEditor uses permissions-list)
└── messages.ts
Creating, viewing and editing a role's permissions look like one feature to me, and this way we follow the feature-based organization proposal in #247.
Thoughts @dcoa, @diana-villalvazo-wgu?
There was a problem hiding this comment.
sounds good to me 👍 great proposal
There was a problem hiding this comment.
Yes, that's great! My only comment is that I think PermissionEditor is more appropriate than PermissionList, as the component allows users to add and remove permissions from a role rather than just view them (That applies for both the modal and the tab, correct?).
There was a problem hiding this comment.
I renamed the component to PermissionEditor and created a follow up ticket two merge the folders #306.
3ad02d3 to
b106b03
Compare
b106b03 to
a33f37e
Compare
a33f37e to
edc7078
Compare
edc7078 to
0f2fbb4
Compare
|
The permission dependencies is implemented now Screen.Recording.2026-12-03.at.3.50.40.PM.mov |
rodmgwgu
left a comment
There was a problem hiding this comment.
Thanks for the updates, I haven't reviewed everything yet, but I'm posting the findings I have so far.
Also, could you update the PR description to reflect the current state please?
Thanks!
rodmgwgu
left a comment
There was a problem hiding this comment.
Ran this in my local and, other than my previous comments, works great, Great work!
d5867b9 to
ccfe6da
Compare
Thank you, I did address your comments and update the description. |
rodmgwgu
left a comment
There was a problem hiding this comment.
Thanks for attending all my comments!, re-ran it in my local and all works as expected.
|
|
||
| return ( | ||
| <div className="py-4"> | ||
| <Row className="mx-0"> |
There was a problem hiding this comment.
instead of having a div wrapping the row why don't add the classname on the row?
There was a problem hiding this comment.
No reason, removed on the next pr of the stack #297

Description
Adds the second step of the create custom role wizard: a permissions matrix where the user picks what the new role grants. Selecting a permission turns on and locks everything it depends on, using the dependency lists the roles catalog now returns (openedx/openedx-authz#658).
Closes openedx/openedx-authz#572.
Design figma
Requires openedx/openedx-authz#560 and openedx/openedx-authz#574
Changes
PermissionsEditor):Permissiontype getsdependsOnandallDependsOnfrom the catalog API. Both default to[]when the backend leaves them out.allDependsOn.Auto-enabled · Required by "…"when the user didn't choose that permission, andRequired by "…"when they did, by hand or through a cloned role.usePermissionSelection):SearchFilter: takes an optionalclassName(defaultmw-xs) so the matrix search can be wider than the table control bars' search.Notes for reviewers
TODO(#573)). Creating the role is in the follow-up PR stacked on this one.roles-permissions/androle-detail/into a single feature folder, as discussed in review and Proposal - feature based code organization #247, is deferred to its own refactor PR.Testing
Automated
tscandeslintpass.Manual
Open Create Custom Role, enter a name and click Next.
Auto-enabled · Required by "…"beside the name. Turning it off releases them.Required by "…"and stays on when the other is turned off.Required by "…", not "Auto-enabled".Demo
Screen.Recording.2026-12-04.at.10.28.00.AM.mov