Download the PHP package gozoro/yii2-rbac-console without Composer
On this page you can find all versions of the php package gozoro/yii2-rbac-console. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download gozoro/yii2-rbac-console
More information about gozoro/yii2-rbac-console
Files in gozoro/yii2-rbac-console
Package yii2-rbac-console
Short Description RBAC configuration and managment tool in the console.
License MIT
Homepage https://github.com/gozoro/yii2-rbac-console
Informations about the package yii2-rbac-console
yii2-rbac-console
RBAC configuration and managment tool in the console.
Installation
Preparation
Create console controller commands\RbacController.php.
Controller actions
-
./yii rbac/initPerforms initial RBAC configuration (remembers user roles, deletes all data, revert data from the config, restores users roles). You can use it after adding new roles or removing not need roles. -
rbac/show-configDisplays config (default config:@app/config/rbac.php). -
rbac/rolesDisplays a list of roles from AuthManager. -
rbac/permissionsDisplays a list of permissions from AuthManager. -
rbac/rulesDisplays a list of rules from AuthManager. -
rbac/show(default) Displays a list of roles and users. -
rbac/show-userDisplays roles and permissions of user. -
rbac/assignAssigns a role (or a permission) to a user. -
rbac/unassignRevokes role or permission from a user. rbac/unassign-allRevokes all roles and permissions from a user.
Configuration
Create config @app/config/rbac.php.
Example:
Use command ./yii rbac/init to initialize or re-initialize RBAC-scheme from config.