PHPackages                             chervand/yii-access-control - 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. chervand/yii-access-control

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

chervand/yii-access-control
===========================

v0.1.0(10y ago)017MITPHP

Since Jul 22Pushed 10y ago1 watchersCompare

[ Source](https://github.com/chervand/yii-access-control)[ Packagist](https://packagist.org/packages/chervand/yii-access-control)[ RSS](/packages/chervand-yii-access-control/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

chervand/yii-access-control
===========================

[](#chervandyii-access-control)

AuthManager configuration
-------------------------

[](#authmanager-configuration)

Proper authManager component should be configured (CPhpAuthManger or CDbAuthManager)

### CDbAuthManager (Example)

[](#cdbauthmanager-example)

Apply migrations or create DB tables as described in [CDbAuthManager](http://www.yiiframework.com/doc/api/1.1/CDbAuthManager) documentation.

```
    ...
	'components' => [
	    ...
		'authManager' => [
			'class' => 'CDbAuthManager',
			'connectionID' => 'db',
			'itemTable' => 'auth_item',
			'itemChildTable' => 'auth_item_child',
			'assignmentTable' => 'auth_assignment',
			'defaultRoles' => ['guest', 'user', 'support', 'moder', 'admin'],
		],
		...
    ],
    ...
```

Filter configuration
--------------------

[](#filter-configuration)

Import a filter in config or in controller

```
    ...
	'import' => [
	    ...
		'vendor.chervand.yii-access-control.components.*',
		...
	],
	...
```

### Controller

[](#controller)

- exclude - Excluded routes. Will not be filtered.
- message - 403 error message.

```
class Controller extends CController
{
    ...
	public function filters()
	{
		return [
		    ...
			[
				'AccessControlFilter',
				'message' => Yii::t('app', 'You are not authorized to perform this action.'),
				'exclude' => [
				    'site/index',
                    'site/error'
                ]
			],
			...
		];
	}
	...
}
```

Creating Rules
--------------

[](#creating-rules)

[![RBAC Scheme Example](rbac_scheme_example.png)](rbac_scheme_example.png)

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

3992d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/765117f2c9121f6f8cf4c8565f2bda0df8b7bbfb929660f9d94c1715b77e3820?d=identicon)[chervand](/maintainers/chervand)

---

Top Contributors

[![chervand](https://avatars.githubusercontent.com/u/450972?v=4)](https://github.com/chervand "chervand (4 commits)")

### Embed Badge

![Health badge](/badges/chervand-yii-access-control/health.svg)

```
[![Health](https://phpackages.com/badges/chervand-yii-access-control/health.svg)](https://phpackages.com/packages/chervand-yii-access-control)
```

###  Alternatives

[kartik-v/yii2-password

Useful password strength validation utilities for Yii Framework 2.0

761.2M17](/packages/kartik-v-yii2-password)

PHPackages © 2026

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