-
Notifications
You must be signed in to change notification settings - Fork 33
feat: 🎸 Add grant templates for roles #3115
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
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
41a5fb5 to
6e86984
Compare
6e86984 to
19edfec
Compare
ui/admin/app/controllers/scopes/scope/roles/role/add-grant-templates.js
Outdated
Show resolved
Hide resolved
21e258f to
0ba1309
Compare
hashicc
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.
🚀 Looks great, two small comments on the tests
ui/admin/tests/unit/controllers/scopes/scope/roles/role/add-grant-templates-test.js
Outdated
Show resolved
Hide resolved
ui/admin/tests/unit/controllers/scopes/scope/roles/role/add-grant-templates-test.js
Outdated
Show resolved
Hide resolved
2ed4c1c to
c763ae0
Compare
c763ae0 to
e3c0547
Compare
| /> | ||
| <form.actions | ||
| @submitText={{t | ||
| 'resources.role.grant-templates.actions.add-grant-templates' |
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.
would it make sense to move these action buttons to the top? Add principals does this, so wanted to check if we want to have the same for this route.
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.
Yeah I saw that, from the designs we didn't want that and I think historically we only had those buttons on top because the table could be infinite. Realistically I think we eventually want to paginate these pages properly and move the buttons back below the table rather than having them on top.
| } | ||
| } | ||
|
|
||
| .role-manage-custom-scopes-form { |
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 removed these because it seemed like these styles for manage scopes were re-applying some of the search-filtering styles (namely some of them were because the class was a level higher in the dom so the > div wasn't applying margins).
Let me know if there's any concern or anything I missed about these styles
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.
Nice refactor to combine the pattern! The visual diff looks the exact same to me
DhariniJeeva
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.
looks great!
hashicc
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.
Looks great! Thanks for the style refactor, too!
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 looks great!
Quick question around when a user adds an existing grant template - do we want to filter it out and not display in the UI to avoid jump when user clicks on Save button ?
Screen.Recording.2026-01-26.at.11.08.35.AM.mov
Ahh unless letting users add the same template is intentional to create variations |
If I'm understanding correctly, the question is filtering out any grants that are the same if they end up with the same ones when adding? If so, we're just adding exactly as they are. Since these are templates, if there's any existing ones it's up to the user to decide how they want to change the grants if at all. |
| } | ||
|
|
||
| /** | ||
| * Redirect to role grants as if nothing ever happened. |
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.
😆
Description
Added grant templates which are suggestions that are currently completely static data and can be used as a base for writing grants for users.
Screenshots (if appropriate)
Screen.Recording.2025-12-19.at.3.24.46.PM.mov
How to Test
Go to the roles page and try using the add grant templates action.
Checklist
[ ] I have added JSON response output for API changes[ ] I have added steps to reproduce and test for bug fixes in the descriptiona11y-testslabel to run a11y audit tests if neededPCI review checklist
Examples of changes to security controls include using new access control methods, adding or removing logging pipelines, etc.