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

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

yii2lab/yii2-rbac
=================

v1.28.0(6y ago)01.3kMITPHPPHP &gt;=5.3.0

Since Jun 22Pushed 6y ago1 watchersCompare

[ Source](https://github.com/yii2lab/yii2-rbac)[ Packagist](https://packagist.org/packages/yii2lab/yii2-rbac)[ RSS](/packages/yii2lab-yii2-rbac/feed)WikiDiscussions master Synced yesterday

READMEChangelog (10)Dependencies (2)Versions (54)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/a49bd77ea98b3744100111f651305cfb3aab353b7e1635dcac317dea41d2c248/68747470733a2f2f706f7365722e707567782e6f72672f796969326c61622f796969322d726261632f762f737461626c652e706e67)](https://packagist.org/packages/yii2lab/yii2-rbac)[![Total Downloads](https://camo.githubusercontent.com/42950fa6374cef8245077983acfa382820d8230c95e01579ab6631eb2940a301/68747470733a2f2f706f7365722e707567782e6f72672f796969326c61622f796969322d726261632f646f776e6c6f6164732e706e67)](https://packagist.org/packages/yii2lab/yii2-rbac)

Описание
--------

[](#описание)

Модуль для управления ролями пользователей RBAC.

Ссылки
------

[](#ссылки)

- [Руководство](guide/ru/README.md)
- [Установка](guide/ru/install.md)

Установка
---------

[](#установка)

Устанавливаем зависимость:

```
composer require yii2module/yii2-rbac

```

Объявляем модуль:

```
return [
	'modules' => [
		// ...
		'fixtures' => 'yii2module\rbac\Module',
		// ...
	],
];
```

Документация
------------

[](#документация)

### Поиск и добавление правил

[](#поиск-и-добавление-правил)

Команда поиска правил и добавления в RBAC

```
php yii rbac/rule/add

```

Сканируется файловая система сайта на наличие правил для RBAC. Затем в RBAC добавляются те правила, которых еще нет. Существующие правила в RBAC не затираются.

### Генерация констант

[](#генерация-констант)

Команда генерации констант для ролей, правил и полномочий

```
php yii rbac/const/generate

```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 91.8% 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 ~16 days

Recently: every ~28 days

Total

53

Last Release

2373d ago

Major Versions

v0.0.5 → v1.0.02017-10-27

### Community

Maintainers

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

---

Top Contributors

[![untek-developer](https://avatars.githubusercontent.com/u/3309892?v=4)](https://github.com/untek-developer "untek-developer (101 commits)")[![svcwooppay](https://avatars.githubusercontent.com/u/55688887?v=4)](https://github.com/svcwooppay "svcwooppay (9 commits)")

---

Tags

rbacyii2auth manager

### Embed Badge

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

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

###  Alternatives

[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)[letyii/yii2-rbac-cached

Cached for yii2 RBAC

112.2k](/packages/letyii-yii2-rbac-cached)

PHPackages © 2026

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