RBAC Auth manager for Yii2

Installs: 656

Dependents: 1

Suggesters: 0

Security: 0

Stars: 1

Watchers: 2

Forks: 0

Open Issues: 1


v1.0.1 2020-10-21 08:26 UTC

This package is not auto-updated.

Last update: 2023-09-17 19:42:28 UTC


This is a fork of mdmsoft/yii2-admin


Install With Composer

The preferred way to install this extension is through composer.

Either run

php composer.phar require mix8872/yii2-user-admin "dev-master"

Or, you may add

"mix8872/yii2-user-admin": "dev-master"

to the require section of your composer.json file and execute php composer.phar update.


Once the extension is installed, simply modify your application configuration as follows:

return [
    'modules' => [
        'user-admin' => [
            'class' => 'mix8872\useradmin\Module',
    'as access' => [
        'class' => 'mix8872\useradmin\components\AccessControl',
        'allowActions' => [
            // The actions listed here will be allowed to everyone including guests.
            // So, 'admin/*' should not appear here in the production, of course.
            // But in the earlier stages of your development, you may probably want to
            // add a lot of actions here until you finally completed setting up rbac,
            // otherwise you may not even take a first step.

See Yii RBAC for more detail.

If you use database (class 'yii\rbac\DbManager') to save rbac data, execute the migration here:

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

If you wand add to user fields: img and display_name, execute the migration here:

yii migrate --migrationPath=@vendor/mix8872/user-admin/src/migrations