it-yakutia/yii2-rbac

Role Based Access Controll for yii2

Installs: 366

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:yii2-extension

v1.0.1 2022-06-22 17:53 UTC

This package is auto-updated.

Last update: 2024-10-22 23:05:00 UTC


README

Role Based Access Controll for yii2

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist it-yakutia/yii2-rbac "*"

or add

"it-yakutia/yii2-rbac": "*"

to the require section of your composer.json file.

Models use yii2 DbManager class and required to run migration:

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

Usage

Once the extension is installed, simply use it in your code by adding url on your navigation bar:

Url::toRoute('/rbac/permission/index');
Url::toRoute('/rbac/role/index');
Url::toRoute('/rbac/user/index');

This controllers are allowed for admin role