johnathanmdell / identity
RBAC Component
Installs: 9
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/johnathanmdell/identity
Requires
- php: >=5.4.0
Requires (Dev)
- phpspec/phpspec: ~2.1
This package is not auto-updated.
Last update: 2025-10-07 21:17:46 UTC
README
identity
A very basic RBAC component that allows you to provide your user's role permissions and then simply check if a user has permission to a page, action or whatever else you would want to check against.
$identity = new \JohnathanMDell\Identity\Identity([
'route.true' => true,
'route.false' => false,
]);
var_dump($identity->isGranted('route.true'));
// returns true
var_dump($identity->isGranted('route.false'));
// returns false
var_dump($identity->isGranted('route.notfound'));
// returns false