Download the PHP package jeffwalsh/yii2-rbac-plus without Composer
On this page you can find all versions of the php package jeffwalsh/yii2-rbac-plus. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download jeffwalsh/yii2-rbac-plus
More information about jeffwalsh/yii2-rbac-plus
Files in jeffwalsh/yii2-rbac-plus
Download jeffwalsh/yii2-rbac-plus
More information about jeffwalsh/yii2-rbac-plus
Files in jeffwalsh/yii2-rbac-plus
Vendor jeffwalsh
Package yii2-rbac-plus
Short Description Database role base access control manager for yii2
License Apache-2.0
Package yii2-rbac-plus
Short Description Database role base access control manager for yii2
License Apache-2.0
Please rate this library. Is it a good library?
Informations about the package yii2-rbac-plus
yii2-rbac-plus
Database role base access control manager for yii2
Features
- CRUD operations for roles, permissions and rules
- Allows to assign multiple roles to user
- Nice views to intergrate right away
- Integrated with Yii2-user-plus - flexible user management module
Installation
The preferred way to install this extension is through composer.
Either run
or add
to the require section of your composer.json
file.
Usage
- Let 's add into modules config in your main config file
`
Next, update the database schema
`
Ok. That's done. Avaiable route now:
- /rbac/rule
- /rbac/permission
- /rbac/role
- /rbac/assignment
- The module configuration avaible:
`
- userModelClassName: The user model class.
If you not set or set null, RBAC Plus will be get fromYii::$app->getUser()->identityClass
- userModelIdField: The user model id field.
Default id field is 'id', you must set this config if primary key of user table in database is not 'id' - userModelLoginField The user model login field.
Default login field is 'username'. Maybe you use email field or something other for login. So you must change this config - userModelLoginFieldLabel The user model login field label.
If you set null the label will get from$userModelClass->attributeLabels()[$userModelLoginField]
- userModelExtraDataColumls The extra data columns you want to show in user assign views.
The default in assignment data gridview just display id and login column data. if you want to add created_at column you can add `` - beforeCreateController The callable before create all controller of Rbac Plus module.
The default it is null. You need config this when you want to restrict access to Rbac Plus module.
Example: `` - beforeActionThe callable before action of all controller in Rbac Plus module.
The default it is null. You need config this when you want to restrict access to any action in some controller of Rbac Plus module
Example: ``
All versions of yii2-rbac-plus with dependencies
PHP Build Version
Package Version
The package jeffwalsh/yii2-rbac-plus contains the following files
Loading the files please wait ....