PHPackages                             orcsis/yii2-admin - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. orcsis/yii2-admin

ActiveYii2-extension[Authentication &amp; Authorization](/categories/authentication)

orcsis/yii2-admin
=================

Auth manager for Yii2

1.0.0-beta(11y ago)020BSD-3-ClausePHP

Since May 27Pushed 10y ago1 watchersCompare

[ Source](https://github.com/orcsis/yii2-admin)[ Packagist](https://packagist.org/packages/orcsis/yii2-admin)[ RSS](/packages/orcsis-yii2-admin/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (2)Used By (0)

RBAC Manager for Yii 2
======================

[](#rbac-manager-for-yii-2)

Documentation
-------------

[](#documentation)

- [Change Log](CHANGELOG.md).
- [Basic Usage](docs/guide/basic-usage.md).
- [Using Menu](docs/guide/using-menu.md).
- [Api](http://mdmsoft.github.io/yii2-admin/index.html)

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

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

```

for dev-master

```
php composer.phar require mdmsoft/yii2-admin "dev-master"

```

or add

```
"mdmsoft/yii2-admin": "*"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

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

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

See [Yii RBAC](http://www.yiiframework.com/doc-2.0/guide-security-authorization.html#role-based-access-control-rbac) for more detail. You can then access Auth manager through the following URL:

```
http://localhost/path/to/index.php?r=admin
http://localhost/path/to/index.php?r=admin/route
http://localhost/path/to/index.php?r=admin/permission
http://localhost/path/to/index.php?r=admin/menu
http://localhost/path/to/index.php?r=admin/role
http://localhost/path/to/index.php?r=admin/assignment

```

To use menu manager (optional). Execute yii migration here:

```
yii migrate --migrationPath=@mdm/admin/migrations

```

If You use database (class 'yii\\rbac\\DbManager') to save rbac data. Execute yii migration here:

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

```

Customizing Controller
----------------------

[](#customizing-controller)

Some controller property maybe need to change. To do that, change it via `controllerMap` property.

```
	'modules' => [
		'admin' => [
			...,
            'controllerMap' => [
                 'assignment' => [
                    'class' => 'orcsis\admin\controllers\AssignmentController',
                    'userClassName' => 'path\to\models\User',
                    'idField' => 'user_id', // id field of model User
                ]
            ],
            ...
		]
		...
	],
```

Customizing Layout
------------------

[](#customizing-layout)

As default, `module` using application layout as template. To change it, you have to set `layout` property. This extension come with three layout that can be used, there are 'left-menu', 'right-menu' and 'top-menu'.

```
	'modules' => [
		'admin' => [
			...,
            'layout' => 'left-menu', // default null. other avaliable value 'right-menu' and 'top-menu'
        ],
        ...
    ],
```

If you use one of them, you can also customize the menu. You can change menu label or disable it.

```
	'modules' => [
		'admin' => [
			...,
            'layout' => 'left-menu', // default null. other avaliable value 'right-menu' and 'top-menu'
            'menus' => [
                'assignment' => [
                    'label' => 'Grand Access' // change label
                ],
                'route' => null, // disable menu
            ],
        ],
        ...
    ],
```

[screenshots](https://picasaweb.google.com/105012704576561549351/Yii2Admin?authuser=0&feat=directlink)

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 78.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4366d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7523136?v=4)[Oliver](/maintainers/orcoliver)[@orcoliver](https://github.com/orcoliver)

---

Top Contributors

[![mdmunir](https://avatars.githubusercontent.com/u/5828252?v=4)](https://github.com/mdmunir "mdmunir (146 commits)")[![orcoliver](https://avatars.githubusercontent.com/u/7523136?v=4)](https://github.com/orcoliver "orcoliver (20 commits)")[![sosojni](https://avatars.githubusercontent.com/u/3853867?v=4)](https://github.com/sosojni "sosojni (9 commits)")[![hscstudio](https://avatars.githubusercontent.com/u/2976897?v=4)](https://github.com/hscstudio "hscstudio (6 commits)")[![kongoon](https://avatars.githubusercontent.com/u/186737?v=4)](https://github.com/kongoon "kongoon (2 commits)")[![marciocamello](https://avatars.githubusercontent.com/u/4071580?v=4)](https://github.com/marciocamello "marciocamello (1 commits)")[![qwekaa](https://avatars.githubusercontent.com/u/4110449?v=4)](https://github.com/qwekaa "qwekaa (1 commits)")[![engineergym](https://avatars.githubusercontent.com/u/216024296?v=4)](https://github.com/engineergym "engineergym (1 commits)")

---

Tags

authyiiadmin

### Embed Badge

![Health badge](/badges/orcsis-yii2-admin/health.svg)

```
[![Health](https://phpackages.com/badges/orcsis-yii2-admin/health.svg)](https://phpackages.com/packages/orcsis-yii2-admin)
```

###  Alternatives

[windhoney/yii2-rest-rbac

RBAC Auth manager for Yii2 RESTful

811.2k](/packages/windhoney-yii2-rest-rbac)[izyue/yii2-admin

RBAC Auth manager for Yii2

391.8k](/packages/izyue-yii2-admin)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
