Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is basically just a repost of this PR: #5826 with a new base branch.
This PR is for #5823. The update/edit functionality will follow in a second PR to keep things small and easy to review. Currently this is just the index, new, create, and delete methods.
This PR creates a new role management page in the new admin interface, following the existing pattern used for tax categories and refund reasons.
The form is rendered via a modal dialog on the roles list by leveraging Turbo frames. Successful creation leads to a turbo stream page refresh, which updates the existing list preserving the query params and the scroll position, for a consistent UX.
The attached video shows the functionality visually:
New tab nesting, scoping, and role creation:
Screen.Recording.2024-08-14.at.7.05.11.PM.mov
Deletion:
Screen.Recording.2024-08-14.at.7.08.38.PM.mov
Additional Questions
This is the first piece for the new [Admin][Settings] Introduce role creation and modification capability ticket.
Example designs:
Spree::Role
currently lacks:I am assuming that to support the example designs, I will be adding those attributes to the
Spree::Role
model in a future PR, but I am unsure whether that should go insolidus_admin
or whether that should be added tocore
.Additionally, the example designs seem to differentiate between "custom" and "standard" roles. Will we be creating new stock roles with default permissions sets and adding them to core/db/default/spree/roles.rb? If so, what will those default roles and permissions be?
Summary
Checklist
Check out our PR guidelines for more details.
The following are mandatory for all PRs:
The following are not always needed: