Skip to content

Simple and flexible role & permission system for PHP

Notifications You must be signed in to change notification settings

zidsa/beermission

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Beermission

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();

About

Simple and flexible role & permission system for PHP

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages