2017 © Pedro Peláez
 

yii2-extension yii2-rbac-module

Yii2 RBAC module with generating assignments to DB from RBAC data store file rbac.php

image

zelenin/yii2-rbac-module

Yii2 RBAC module with generating assignments to DB from RBAC data store file rbac.php

  • Monday, March 2, 2015
  • by zelenin
  • Repository
  • 9 Watchers
  • 24 Stars
  • 1,519 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 10 Forks
  • 0 Open issues
  • 10 Versions
  • 0 % Grown

The README.md

Yii2 RBAC module

Yii2 RBAC module with generating assignments to DB from RBAC data storage files. Also "classic" PhpManager is available., (*1)

Installation

Composer

The preferred way to install this extension is through Composer., (*2)

Either run, (*3)

php composer.phar require zelenin/yii2-rbac-module "dev-master"

or add, (*4)

"zelenin/yii2-rbac-module": "dev-master"

to the require section of your composer.json, (*5)

Usage

DbManager

Configure AuthManager component in config:, (*6)

'components' => [
    'authManager' => [
        'class' => \Zelenin\yii\modules\Rbac\components\DbManager::className(),
        'itemFile' => '@common/config/rbac/items.php',
        'assignmentFile' => '@common/config/rbac/assignments.php',
        'ruleFile' => '@common/config/rbac/rules.php',
        'defaultRole' => 'user',
        'roleParam' => 'role' // User model attribute
    ]
]

Run:, (*7)

php yii migrate --migrationPath=@yii/rbac/migrations/

or use sql file in @yii/rbac/migrations/, (*8)

For generating assignments from php storage files run, (*9)

php yii rbac/generate

For storage files examples see example directory, (*10)

PhpManager

Configure AuthManager component in config:, (*11)

'components' => [
    'authManager' => [
        'class' => \Zelenin\yii\modules\Rbac\components\PhpManager::className(),
        'itemFile' => '@common/config/rbac/items.php',
        'assignmentFile' => '@common/config/rbac/assignments.php',
        'ruleFile' => '@common/config/rbac/rules.php',
        'defaultRole' => 'user',
        'roleParam' => 'role', // User model attribute
    ]
]

Info

See Yii2 authorization guide, (*12)

Author

Aleksandr Zelenin, e-mail: aleksandr@zelenin.me, (*13)

The Versions

02/03 2015

dev-master

9999999-dev https://github.com/zelenin/yii2-rbac-module

Yii2 RBAC module with generating assignments to DB from RBAC data store file rbac.php

  Sources   Download

MIT

The Requires

 

yii2 rbac

02/03 2015

0.3.0

0.3.0.0 https://github.com/zelenin/yii2-rbac-module

Yii2 RBAC module with generating assignments to DB from RBAC data store file rbac.php

  Sources   Download

MIT

The Requires

 

yii2 rbac

25/02 2015

0.2.3

0.2.3.0 https://github.com/zelenin/yii2-rbac-module

Yii2 RBAC module with generating assignments to DB from RBAC data store file rbac.php

  Sources   Download

MIT

The Requires

 

yii2 rbac

23/11 2014

0.2.2

0.2.2.0 https://github.com/zelenin/yii2-rbac-module

Yii2 RBAC module with generating assignments to DB from RBAC data store file rbac.php

  Sources   Download

MIT

The Requires

 

yii2 rbac

02/11 2014

0.2.1

0.2.1.0 https://github.com/zelenin/yii2-rbac-module

Yii2 RBAC module with generating assignments to DB from RBAC data store file rbac.php

  Sources   Download

MIT

The Requires

 

yii2 rbac

20/10 2014

0.2.0

0.2.0.0 https://github.com/zelenin/yii2-rbac-module

Yii2 RBAC module with generating assignments to DB from RBAC data store file rbac.php

  Sources   Download

MIT

The Requires

 

yii2 rbac

30/06 2014

0.1.0

0.1.0.0 https://github.com/zelenin/yii2-rbac-module

Yii2 RBAC module with generating assignments to DB from RBAC data store file rbac.php

  Sources   Download

MIT

The Requires

 

yii2 rbac

13/06 2014

0.0.3

0.0.3.0 https://github.com/zelenin/yii2-rbac-module

Yii2 RBAC module with generating assignments to DB from RBAC data store file rbac.php

  Sources   Download

MIT

The Requires

 

yii2 rbac

08/06 2014

0.0.2

0.0.2.0 https://github.com/zelenin/yii2-rbac-module

Yii2 RBAC module with generating assignments to DB from RBAC data store file rbac.php

  Sources   Download

MIT

The Requires

 

yii2 rbac

03/06 2014

0.0.1

0.0.1.0 https://github.com/zelenin/yii2-rbac-module

Yii2 RBAC module with generating assignments to DB from RBAC data store file rbac.php

  Sources   Download

MIT

The Requires

 

yii2 rbac