Skip to content
Simple leightweight PHP Role Based Access Control library
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Simple leightweight PHP Role Based Access Control library

How does this library work?

I have tried to keep things simple. The main idea was to let the user implement an interface which provides the user and his permissions. The permissions are assigned to roles and roles are assigned to users.

The library provides a simple way to verify permissions without re-inventing the wheel.

The library is also available on Packagist:

missing something? create a pull request!


  • 1.3.0 supporting owners:


You can install the package via composer:

composer require doganoo/simple-rbac


There are two main interfaces you have to implement:

* doganoo\SimpleRBAC\Common\IUser
* doganoo\SimpleRBAC\Common\IDataProvider

The first interface represents the user to whom permissions are granted or denied. The second interface holds all necessary information, such as the user, a single permission and default permissions.

IDataProvider can be used to connect to a data source (database, files, HTTP, etc.) in order to set up.

The doganoo\SimpleRBAC\Handler\PermissionHandler class uses the interfaces above to determine whether an action is permitted or not.

doganoo\SimpleRBAC\Common\IPermission and doganoo\SimpleRBAC\Common\IRole interfaces represent a single permission and a user's role.


Feel free to send a pull request to add more algorithms and data structures.


Doğan Uçar (@doganoo)



You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.