Download the PHP package wsdslm/yii2-rbac without Composer
On this page you can find all versions of the php package wsdslm/yii2-rbac. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package yii2-rbac
Features
- WEB UI Manager
- Route Access Filter
Todo
- I18n
Install
via Composer
composer require wsdslm/yii2-rbac
Config
# config/web.php
'components' => [
'authManager' => [
'class' => yii\rbac\DbManager::className(),
]
],
'modules' => [
'rbac' => [
'class' => ws\rbac\Module::className(),
]
],
database migration
yii migrate --migrationPath=@yii/rbac/migrations
Usage
use Route Access Filter
-
add
ws\rbac\components\RouteAccessFilterforapp\controllers\SiteControlleruse ws\rbac\components\RouteAccessFilter; public function behaviors() { return [ 'rbac' => [ 'class' => RouteAccessFilter::className(), 'only' => ['t'], ], ]; } public function actionT() { return __METHOD__; } - Create Route access Permission at
http://localhost:8080/rbac/permission/create- Permission Name
basic.site.t(module_id.controller_id.action_id)
- Permission Name
- Create Role at
http://localhost:8080/rbac/role/create- Role Name
admin
- Role Name
- Manager Role at
http://localhost:8080/rbac/role/index- Click icon cog
- Add Child
basic.site.t
- Assign Role for User at
http://localhost:8080/rbac/assign
All versions of yii2-rbac with dependencies
PHP Build Version
Package Version
The package wsdslm/yii2-rbac contains the following files
Loading the files please wait ...