Skip to content
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

Merged
merged 1 commit into from
May 24, 2024

Conversation

Dobmod
Copy link
Member

@Dobmod Dobmod commented May 23, 2024

No description provided.

@hsluoyz
Copy link
Member

hsluoyz commented May 23, 2024

@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
Copy link
Member

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.

$this->assertFalse(0 === $exitCode);
$this->assertTrue(Enforcer::hasRoleForUser('eve', 'writer'));
$this->assertTrue(Enforcer::hasNamedGroupingPolicy('g', 'eve', 'writer'));
Copy link
Member

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

@Dobmod Dobmod changed the title feat: Add type parameter to artisan commands feat: add ptype parameter to artisan commands May 23, 2024
@Dobmod Dobmod requested a review from leeqvip May 23, 2024 17:05
Copy link
Member

@leeqvip leeqvip left a 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.

@Dobmod Dobmod reopened this May 24, 2024
@Dobmod
Copy link
Member Author

Dobmod commented May 24, 2024

@leeqvip Sorry, due to my lack of proficiency, I caused a lot of trouble. I have corrected it this time.plz review

@hsluoyz
Copy link
Member

hsluoyz commented May 24, 2024

@leeqvip

@leeqvip leeqvip merged commit 783c401 into php-casbin:master May 24, 2024
74 checks passed
@leeqvip
Copy link
Member

leeqvip commented May 24, 2024

🎉 This PR is included in version 3.2.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@nomeguy nomeguy mentioned this pull request May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants