Repository navigation
feat: seed an ACL rule so Administrator reaches the dashboard - #43
Merged
Merged
Conversation
No package seeded a rule for admin.dashboard.read, so the route denied every role and the Dashboard navigation link was hidden from everyone. Adds Acl\RuleSeeds, which allows Administrator the dashboard route (Developer inherits it), registers it under the webware-core AclInterface rule_seed_providers and as an invokable, and raises the webware-core floor to 1.0.0-alpha.8, the first release that ships RuleSeed. Signed-off-by: Joey Smith <jsmith@webinertia.net>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Types of changes
Checklist:
1.0.x)Description
Nothing seeded an ACL rule for
admin.dashboard.read(webware-acl seeds its own routes for Developer, usermanager seeds its own for Administrator), so the dashboard route denied every role and its Dashboard navigation link was hidden from everyone.Webware\Admin\Acl\RuleSeedsallows Administrator the dashboard route; Developer reaches it through role inheritance. The resource id follows the application admin name ({adminName}.dashboard.read).Webware\Core\AclInterfacerule_seed_providersand as an invokable.webware/webware-corefloor to^1.0.0-alpha.8, the first release that shipsRuleSeed.Existing databases need
acl:seedrun once to pick the rule up.How has this been tested?
mago format --check,lint,analyze,guardexit 0.composer test: 27 unit tests,composer test-integration: 11,composer mutation-test: 69 mutants, all killed. New tests assert the rule, the admin-name handling, and that every seeded resource id is a route the RouteProvider registers.