xj/yii2-rbac-module yii2-rbac-module

yii2-rbac-module

composer.json

"xj/yii2-rbac-module": "~1.0.0",

config


'components' => [
    'authManager' => [
        'class' => 'yii\rbac\PhpManager',
        'itemFile' => '@common/rbac/items.php',
        'assignmentFile' => '@common/rbac/assignments.php',
        'ruleFile' => '@common/rbac/rules.php',
    ],
],

IP & Roles


'modules' => [
    'rbac' => [
        'class' => 'xj\rbac\Module',
        'userIdField' => 'id',
        'userNameField' => 'username',
        'userTableModelName' => '\common\models\Admin',
        'allowedIPs' => ['127.0.0.1', '::1'],
        'roles' => ['admin'],
    ]
],

IP Only


'modules' => [
    'rbac' => [
        'class' => 'xj\rbac\Module',
        'userIdField' => 'id',
        'userNameField' => 'username',
        'userTableModelName' => '\common\models\Admin',
        'layout' => 'main', //optional
        'allowedIPs' => ['127.0.0.1', '::1'],
        'roles' => ['@', '?'],
    ]
],

Role Only


'modules' => [
    'rbac' => [
        'class' => 'xj\rbac\Module',
        'userIdField' => 'id',
        'userNameField' => 'username',
        'userTableModelName' => '\common\models\Admin',
        'allowedIPs' => ['*'],
        'roles' => ['admin'],
    ]
],

access


http://project/index.php?r=rbac

Statistics

Downloads
GitHub Stars
GitHub Forks

Releases

Comments



1.0.3 is the latest of 4 releases



BSD-3-Clause license
Stats
3 github stars & 1 github forks
0 downloads in the last day
0 downloads in the last 30 days
127 total downloads