Skip to content

tkj45/yii2-admin

 
 

Repository files navigation

RBAC Manager for Yii 2

Dosc:

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require mdmsoft/yii2-admin "*"

or add

"mdmsoft/yii2-admin": "*"

to the require section of your composer.json file.

Usage

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

return [
	'bootstrap' => [
		'admin',
		...
	],
	'modules' => [
		'admin' => [
			'class' => 'mdm\admin\Module',
			'allowActions' => [
				'admin/*', // add or remove allowed actions to this list
			]
		]
		...
	],
	...
	'components' => [
		....
		'authManager' => [
			'class' => 'yii\rbac\PhpManager', // or use 'yii\rbac\DbManager'
		]
	],
];

See Yii RBAC for more detail. You can then access Auth manager through the following URL:

http://localhost/path/to/index.php?r=admin

To use menu manager (optional). Execute yii migration

yii migrate --migrationPath=@mdm/admin/migration

screenshots

About

Auth manager for Yii2

Resources

Stars

Watchers

Forks

Packages

No packages published