2017 © Pedro Peláez
 

yii2-extension yii2-rbac-cms-module

Access management from UI

image

bariew/yii2-rbac-cms-module

Access management from UI

  • Friday, March 25, 2016
  • by bariew
  • Repository
  • 4 Watchers
  • 6 Stars
  • 466 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 5 Forks
  • 2 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

Yii2 rbac module.

Description

Manages access to site controller actions. Stores all permissions in database., (*1)

Installation

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

Either run, (*3)

php composer.phar require --prefer-dist bariew/yii2-rbac-cms-module "*"

or add, (*4)

"bariew/yii2-rbac-cms-module": "*"

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

Usage

  • Define authManager component in main config components section, you'll need some i18n settings too (example):
    'components' => [
    ...
        'authManager'   => [
            'class' => '\yii\rbac\DbManager'
        ],
        'i18n' => [ // this example only if you don't have i18n defined in any other way.
            'translations' => [
                '*' => [
                    'class' => 'yii\i18n\PhpMessageSource',
                ],
            ],
        ],
    ],
  • Include 'rbac' module in modules config section:
    'modules' => [
    ...
        'rbac'   => [
            'class' => 'bariew\rbacModule\Module'
        ],
    ],
  • Apply migrations from module migrations folder. E.g. you may copy those migrations to your application migrations folder and run common yii console migration command., (*6)

  • Go to rbac/auth-item/index URL and create some roles and permissions, using menu tree with right mouse button., (*7)

  • Use AuthItem::checkAccess() for beforeAction events and ViewAccess::afterRender() for afterRender event. You may also use Yii::$app->authManager in common way., (*8)

The Versions

25/03 2016

dev-sqlite

dev-sqlite

Access management from UI

  Sources   Download

BSD-3-Clause

The Requires

 

by Bariev Pavel

yii2 module cms rbac yii2-null-cms-module

25/12 2015

dev-master

9999999-dev

Access management from UI

  Sources   Download

BSD-3-Clause

The Requires

 

by Bariev Pavel

yii2 module cms rbac yii2-null-cms-module

25/12 2015

1.0.1

1.0.1.0

Access management from UI

  Sources   Download

BSD-3-Clause

The Requires

 

by Bariev Pavel

yii2 module cms rbac yii2-null-cms-module

22/09 2015

1.0.0

1.0.0.0

Access management from UI

  Sources   Download

BSD-3-Clause

The Requires

 

by Bariev Pavel

yii2 module cms rbac yii2-null-cms-module

22/05 2015

0.3.0

0.3.0.0

Access management from UI

  Sources   Download

BSD-3-Clause

The Requires

 

by Bariev Pavel

yii2 module cms rbac yii2-null-cms-module

01/03 2015

0.2.0

0.2.0.0

Access management from UI

  Sources   Download

BSD-3-Clause

The Requires

 

by Bariev Pavel

yii2 module cms rbac yii2-null-cms-module

04/07 2014

0.1.0

0.1.0.0

in development

  Sources   Download

BSD-3-Clause

The Requires

 

by Bariev Pavel

yii2 module cms rbac