-
Notifications
You must be signed in to change notification settings - Fork 4
feat(authz): [FC-0099] permissions tab #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(authz): [FC-0099] permissions tab #12
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. 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:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
ac0a54d to
bcb2376
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #12 +/- ##
==========================================
+ Coverage 92.44% 93.66% +1.22%
==========================================
Files 31 41 +10
Lines 463 710 +247
Branches 81 147 +66
==========================================
+ Hits 428 665 +237
- Misses 34 42 +8
- Partials 1 3 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| }; | ||
|
|
||
| const PermissionTable = ({ permissionsTable, roles }: PermissionTableProps) => ( | ||
| <table className="pgn__data-table bg-light-100" data-testid="permissions-matrix"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider removing this test id and make queries focused on real user interactions.
jacobo-dominguez-wgu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Permissions table looks good on the sandbox, good work 👍
695bff3 to
a05df83
Compare
…on matrix by role and resource
a05df83 to
48efee0
Compare
brian-smith-tcril
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this looks great!
I left a couple comments with questions and a couple with suggestions. Looking forward to hearing your thoughts!
| </td> | ||
| {roles.map(role => ( | ||
| <td key={role.name} className="text-center"> | ||
| {permission.roles[role.name] ? <Icon className="d-inline-block" src={Check} /> : <Icon className="text-danger d-inline-block" src={Close} />} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious as to what color we want the checkmarks to be
Current
"Success"
| {permission.roles[role.name] ? <Icon className="d-inline-block" src={Check} /> : <Icon className="text-danger d-inline-block" src={Close} />} | |
| {permission.roles[role.name] ? <Icon className="text-success d-inline-block" src={Check} /> : <Icon className="text-danger d-inline-block" src={Close} />} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original design has no specific color https://www.figma.com/design/q3Knq0BKoVTBbtaxb81n9R/RBAC---Console---Wireframes?node-id=2750-9661&t=hu3T5aVg659Dg0J2-4
Do you consider the green is a better indicative?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm perfectly happy with it either way. I just saw "text-danger" for the red X and my mind jumped to using text-success for a green check, but if the designs don't have it as green then it's good as is.
brian-smith-tcril
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Permissions tab
This PR add the list of available permissions for libraries in the corresponding tab.
Warning
This PR preferred to merge after #7
Changes overview
ResourceTooltipcomponent to the matrix and the cards, to display descriptive information about the permissions.Evidence
Testing instructions
npm run devCORS_WHITELISTin both LMS/CMS settings.pyhttp://apps.local.openedx.io:2025/admin-console/authz/libraries/:libraryId/authz/*queries, you can use 2 optionsbaseUrlwith your service and, changegetAuthenticatedHttpClienttogetHttpClientto avoid user checks from the backend.Additional information