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/init
Performs 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-config
Displays config (default config:@app/config/rbac.php
). -
rbac/roles
Displays a list of roles from AuthManager. -
rbac/permissions
Displays a list of permissions from AuthManager. -
rbac/rules
Displays a list of rules from AuthManager. -
rbac/show
(default) Displays a list of roles and users. -
rbac/show-user
Displays roles and permissions of user. -
rbac/assign
Assigns a role (or a permission) to a user. -
rbac/unassign
Revokes role or permission from a user. rbac/unassign-all
Revokes 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.