yxvt / beermission
Simple and flexible roles & permission system
Installs: 13
Dependents: 1
Suggesters: 0
Security: 0
Stars: 6
Watchers: 1
Forks: 0
pkg:composer/yxvt/beermission
Requires
- php: ^7.4
Requires (Dev)
- phpstan/phpstan: ^0.12.37
- phpunit/phpunit: ^9.4@dev
This package is not auto-updated.
Last update: 2025-10-28 15:33:15 UTC
README
Simple and flexible roles & permission system.
Usage
Once your Bearer entity is set up, you can determine if it should be granted access to your protected resource in the following fashion.
$this->acl ->bearer($this->bearer) ->that(static function (RequiredGrantBuilder $grantBuilder): void { $grantBuilder->hasRole('Role', 'RoleScope', 'RoleScopeValue'); $grantBuilder->hasPermission('Permission', 'PermissionScope', 'PermissionScopeValue'); }) ->shouldBeGrantedAccessWhen() ->hasAllExpectedGrants();