mwsys / yii2-mwrbac
Yii2 RBAC Extension
v0.0.4
2020-09-15 04:35 UTC
Requires
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2026-03-15 16:30:28 UTC
README
Yii2 RBAC Extension
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist mwsys/yii2-mwrbac "*"
or add
"mwsys/yii2-mwrbac": "*"
to the require section of your composer.json file.
Usage
Up to this moment, this extension only provide actionfilter to handle regex-based access rights
Add parameter to the parameters, this config indicate that filter will add route otomatically as auth item.
'add_auth_item' => true,
Add behavior in configuration.
.... 'as checkuser' => [ 'class' => 'mwsys\mwrbac\components\MwAccessControl', 'allowActions' => [ 'site/*', ],
...