cblink / hyperf-casbin
Installs: 1 362
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Requires
- php: >=7.3
- ext-swoole: >=4.5
- casbin/casbin: ~3.20
- casbin/psr3-bridge: ~1.3
- hyperf/cache: ~2.2
- hyperf/command: ~2.2
- hyperf/config: ~2.2
- hyperf/db: ~2.2
- hyperf/db-connection: ~2.2
- hyperf/logger: ~2.2
- hyperf/utils: ~2.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- hyperf/testing: ~2.2
- mockery/mockery: ^1.0
- phpstan/phpstan: ^1.0
- phpunit/phpunit: >=7.0
- swoole/ide-helper: ^4.5
Suggests
- swow/swow: Required to create swow components.
This package is auto-updated.
Last update: 2024-12-17 12:31:32 UTC
README
.
This library is casbin for hyperf. It allows you to easily use casbin in hyperf. Note that it must use Redis, so make sure your project has Redis.
Thanks for the reference provided by the project: https://github.com/donjan-deng/hyperf-casbin
Installation
composer require cblink/hyperf-casbin
Usage
$enforcer = new Enforcer();
//add permission for user
$enforcer->addPermissionForUser('permission', 'user', 'obj', 'act');
//todo
Contributing
You can contribute in one of three ways:
- File bug reports using the issue tracker.
- Answer questions or fix bugs on the issue tracker.
- Contribute new features or update the wiki.
The code contribution process is not very formal. You just need to make sure that you follow the PSR-0, PSR-1, and PSR-2 coding guidelines. Any new code contributions must be accompanied by unit tests where applicable.
License
MIT