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

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

wsdslm/yii2-rbac
================

RBAC manager for Yii framework

1.0.0(10y ago)07PHP

Since Mar 27Pushed 10y ago1 watchersCompare

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

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

Features
--------

[](#features)

- WEB UI Manager
- Route Access Filter

Todo
----

[](#todo)

- I18n

Install
-------

[](#install)

via Composer

```
composer require wsdslm/yii2-rbac

```

Config
------

[](#config)

```
# config/web.php
'components' => [
    'authManager' => [
        'class' => yii\rbac\DbManager::className(),
    ]
],
'modules' => [
    'rbac' => [
        'class' => ws\rbac\Module::className(),
    ]
],

```

database migration

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

```

Usage
-----

[](#usage)

### use Route Access Filter

[](#use-route-access-filter)

1. add `ws\rbac\components\RouteAccessFilter` for `app\controllers\SiteController`

    ```
     use ws\rbac\components\RouteAccessFilter;

     public function behaviors()
     {
         return [
             'rbac' => [
                 'class' => RouteAccessFilter::className(),
                 'only' => ['t'],
             ],
         ];
     }

     public function actionT()
     {
         return __METHOD__;
     }

    ```
2. Create Route access Permission at `http://localhost:8080/rbac/permission/create`

    1. Permission Name `basic.site.t` (`module_id.controller_id.action_id`)
3. Create Role at `http://localhost:8080/rbac/role/create`

    1. Role Name `admin`
4. Manager Role at `http://localhost:8080/rbac/role/index`

    1. Click icon cog
    2. Add Child `basic.site.t`
5. Assign Role for User at `http://localhost:8080/rbac/assign`

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

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

Unknown

Total

1

Last Release

3698d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5a4a0fae95f6c24c5fc8ff16472ecdc7240fbf456a3c34e44bff7d3ef10d1588?d=identicon)[wsdslm](/maintainers/wsdslm)

---

Top Contributors

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

### Embed Badge

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

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

###  Alternatives

[lowbase/yii2-user

Yii2 user module

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

PHPackages © 2026

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