PHPackages                             xj/yii2-rbac-module - 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. xj/yii2-rbac-module

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

xj/yii2-rbac-module
===================

yii2-rbac-module

1.0.3(6y ago)31271BSD-3-ClausePHP

Since Jul 4Pushed 6y ago1 watchersCompare

[ Source](https://github.com/xjflyttp/yii2-rbac-module)[ Packagist](https://packagist.org/packages/xj/yii2-rbac-module)[ RSS](/packages/xj-yii2-rbac-module/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (4)Dependencies (2)Versions (5)Used By (0)

yii2-rbac-module
================

[](#yii2-rbac-module)

composer.json
-------------

[](#composerjson)

```
"xj/yii2-rbac-module": "~1.0.0",
```

### config

[](#config)

---

```
'components' => [
    'authManager' => [
        'class' => 'yii\rbac\PhpManager',
        'itemFile' => '@common/rbac/items.php',
        'assignmentFile' => '@common/rbac/assignments.php',
        'ruleFile' => '@common/rbac/rules.php',
    ],
],
```

#### IP &amp; Roles

[](#ip--roles)

---

```
'modules' => [
    'rbac' => [
        'class' => 'xj\rbac\Module',
        'userIdField' => 'id',
        'userNameField' => 'username',
        'userTableModelName' => '\common\models\Admin',
        'allowedIPs' => ['127.0.0.1', '::1'],
        'roles' => ['admin'],
    ]
],
```

#### IP Only

[](#ip-only)

---

```
'modules' => [
    'rbac' => [
        'class' => 'xj\rbac\Module',
        'userIdField' => 'id',
        'userNameField' => 'username',
        'userTableModelName' => '\common\models\Admin',
        'layout' => 'main', //optional
        'allowedIPs' => ['127.0.0.1', '::1'],
        'roles' => ['@', '?'],
    ]
],
```

#### Role Only

[](#role-only)

---

```
'modules' => [
    'rbac' => [
        'class' => 'xj\rbac\Module',
        'userIdField' => 'id',
        'userNameField' => 'username',
        'userTableModelName' => '\common\models\Admin',
        'allowedIPs' => ['*'],
        'roles' => ['admin'],
    ]
],
```

### access

[](#access)

---

```
http://project/index.php?r=rbac

```

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity66

Established project with proven stability

 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

Every ~704 days

Total

4

Last Release

2270d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f9f04ccc1ccda3af80975323425ff7d5f7d142603f1ad05df6558ffa63256f8d?d=identicon)[xjflyttp](/maintainers/xjflyttp)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/xj-yii2-rbac-module/health.svg)

```
[![Health](https://phpackages.com/badges/xj-yii2-rbac-module/health.svg)](https://phpackages.com/packages/xj-yii2-rbac-module)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[skeeks/cms

SkeekS CMS — control panel and tools based on php framework Yii2

13825.8k59](/packages/skeeks-cms)[lowbase/yii2-user

Yii2 user module

131.5k2](/packages/lowbase-yii2-user)

PHPackages © 2026

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