2017 © Pedro Peláez
 

yii2-extension yii2-start-rbac-module

The RBAC module for Yii2-Start application.

image

vova07/yii2-start-rbac-module

The RBAC module for Yii2-Start application.

  • Saturday, January 20, 2018
  • by vova07
  • Repository
  • 4 Watchers
  • 12 Stars
  • 9,093 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 9 Forks
  • 2 Open issues
  • 3 Versions
  • 1 % Grown

The README.md

WARNING: This extension is not more maintained

Yii2 RBAC module.

This module provide an RBAC managing system for your yii2 application., (*1)

Installation

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

Either run, (*3)

php composer.phar require --prefer-dist vova07/yii2-start-rbac-module "*"

or add, (*4)

"vova07/yii2-start-rbac-module": "*"

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

Configuration

Edit authManager component in your application config file:, (*6)

'authManager' => [
    'class' => 'yii\rbac\PhpManager',
    'defaultRoles' => [
        'user'
    ],
    'itemFile' => '@vova07/rbac/data/items.php',
    'assignmentFile' => '@vova07/rbac/data/assignments.php',
    'ruleFile' => '@vova07/rbac/data/rules.php',
]

Add new filed role to your users table., (*7)

Usage

Once the extension is installed, simply use it in your code by:, (*8)

Yii::$app->user->can('admin');

Info

By default RBAC module provide 3 defaults roles: user, admin and superadmin., (*9)

You can add more roles by creating your own rules.php file., (*10)

If you want to regenerate the rbac files, you can change the itemFile, assignmentFile and ruleFile in your config authManager section and run php yii cron/cron/init., (*11)

The Versions

20/01 2018

dev-master

9999999-dev

The RBAC module for Yii2-Start application.

  Sources   Download

BSD-3-Clause

The Requires

 

yii2 module yii 2 rbac management modules

01/03 2015

0.1.1

0.1.1.0

The RBAC module for Yii2-Start application.

  Sources   Download

BSD-3-Clause

The Requires

 

yii2 module yii 2 rbac management modules

13/10 2014

0.1.0

0.1.0.0

The RBAC module for Yii2-Start application.

  Sources   Download

BSD-3-Clause

The Requires

 

yii2 module yii 2 rbac management modules