-
Notifications
You must be signed in to change notification settings - Fork 49
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: add ptype parameter to artisan commands #68
Conversation
@leeqvip plz review |
README.md
Outdated
@@ -334,9 +334,11 @@ php artisan policy:add writer,articles,edit | |||
Adds a role for a user: | |||
|
|||
```bash | |||
php artisan role:assign eve writer | |||
php artisan role:assign eve writer --type=g2 |
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.
Please use ptype
instead of type
to ensure consistency with the code.
--ptype
is not required, so two usages should be retained.
tests/Commands/RoleAssignTest.php
Outdated
$this->assertFalse(0 === $exitCode); | ||
$this->assertTrue(Enforcer::hasRoleForUser('eve', 'writer')); | ||
$this->assertTrue(Enforcer::hasNamedGroupingPolicy('g', 'eve', 'writer')); |
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.
Please keep the default test cases and add new test cases specifying ptype
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.
Please fix ci errors.
@leeqvip Sorry, due to my lack of proficiency, I caused a lot of trouble. I have corrected it this time.plz review |
🎉 This PR is included in version 3.2.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
No description provided.