2017 © Pedro Peláez
 

yii2-extension yii2-rbac-module

yii2-rbac-module

image

xj/yii2-rbac-module

yii2-rbac-module

  • Thursday, September 17, 2015
  • by xjflyttp
  • Repository
  • 1 Watchers
  • 3 Stars
  • 84 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 4 Versions
  • 1 % Grown

The README.md

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

The Versions

17/09 2015

dev-master

9999999-dev

yii2-rbac-module

  Sources   Download

BSD-3-Clause

The Requires

 

by Avatar xjflyttp

17/09 2015

1.0.2

1.0.2.0

yii2-rbac-module

  Sources   Download

BSD-3-Clause

The Requires

 

by Avatar xjflyttp

26/08 2015

1.0.1

1.0.1.0

yii2-rbac-module

  Sources   Download

BSD-3-Clause

The Requires

 

by Avatar xjflyttp

04/07 2014

1.0.0

1.0.0.0

yii2-rbac-module

  Sources   Download

BSD-3-Clause

The Requires

 

by Avatar xjflyttp