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

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

vova07/yii2-rbac-module
=======================

The RBAC module for Yii framework.

0.1.0(11y ago)191.2k6[3 issues](https://github.com/vova07/yii2-rbac-module/issues)2BSD-3-ClausePHP

Since Jul 11Pushed 11y ago7 watchersCompare

[ Source](https://github.com/vova07/yii2-rbac-module)[ Packagist](https://packagist.org/packages/vova07/yii2-rbac-module)[ RSS](/packages/vova07-yii2-rbac-module/feed)WikiDiscussions master Synced 2d ago

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

Yii2 RBAC module.
=================

[](#yii2-rbac-module)

This module provide an RBAC managing system for your yii2 application.

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

[](#installation)

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

Either run

```
php composer.phar require --prefer-dist vova07/yii2-rbac-module "*"

```

or add

```
"vova07/yii2-rbac-module": "*"

```

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

Configuration
-------------

[](#configuration)

Edit `authManager` component in your application config file:

```
'authManager' => [
    'class' => 'yii\rbac\PhpManager',
    'defaultRoles' => [
        'user',
        'admin',
        'superadmin'
    ],
    'itemFile' => '@vova07/rbac/data/items.php',
    'assignmentFile' => '@vova07/rbac/data/assignments.php',
    'ruleFile' => '@vova07/rbac/data/rules.php',
]
```

Add new filed `role` to your `users` table.

Usage
-----

[](#usage)

Once the extension is installed, simply use it in your code by:

```
Yii::$app->user->can('admin');
```

Info
----

[](#info)

By default `RBAC` module provide 3 defaults roles: `user`, `admin` and `superadmin`.

You can add more roles by creating your own `rules.php` file.

If you want to regenerate the `rbac` files, you can change the `itemFile`, `assignmentFile` and `ruleFile` in your config `authManager` section and run `php yii cron/cron/init`.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community16

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

4323d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2714082?v=4)[Vasile C.](/maintainers/vova07)[@vova07](https://github.com/vova07)

---

Top Contributors

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

---

Tags

rbacyii2modulemodulesmanagementyii 2

### Embed Badge

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

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

###  Alternatives

[2amigos/yii2-usuario

Highly customizable and extensible user management, authentication, and authorization Yii2 extension

298275.5k14](/packages/2amigos-yii2-usuario)[budyaga/yii2-users

Module for manage users and their rights with the support of registration through social services and assigned to each user more than one social service.

409.1k](/packages/budyaga-yii2-users)

PHPackages © 2026

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