Role-based access control module to provide additional features on top of Zend\Permissions\Rbac
- PHP 8.1 or higher
- Laminas Components 3.x or higher
- DoctrineModule: if you want to use some built-in role and permission providers.
- Laminas\DeveloperTools: if you want to have useful stats added to the Laminas Developer toolbar.
LmcRbacMvc introduces breaking changes from zfcrbac v2:
- The namespace has been changed from
ZfcRbac
toLmcRbacMvc
. - The key
zfc_rbac
in autoload and module config files has been replaced by thelmc_rbac
key.
You can find an upgrade guide to quickly upgrade your application from major versions of ZfcRbac.
LmcRbacMvc only officially supports installation through Composer. For Composer documentation, please refer to getcomposer.org.
Install the module:
$ php composer.phar require lm-commons/lmc-rbac-mvc
Enable the module by adding LmcRbacMvc
key to your application.config.php
or modules.config.php
file. Customize the module by copy-pasting
the lmc_rbac.global.php.dist
file to your config/autoload
folder.
The official documentation is available here.
You can also find some Doctrine entities in the /data folder that will help you to more quickly take advantage of LmcRbac.
- File issues at https://github.com/LM-Commons/LmcRbacMvc/issues.
- Ask questions in the LM-Commons Slack chat.