PHPackages                             developeruz/easyii-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. developeruz/easyii-rbac-module

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

developeruz/easyii-rbac-module
==============================

Role Base Access for EasyiiCMS

41122PHP

Since Feb 3Pushed 9y ago2 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Role Base Access for EasyiiCMS
==============================

[](#role-base-access-for-easyiicms)

This module allows add [Rbac module](https://github.com/developeruz/yii2-db-rbac) to [Easy yii2 cms](http://github.com/noumo/easyii)

Installation guide
------------------

[](#installation-guide)

Please, install [User module for EasyiiCMS by following these instructions](https://github.com/developeruz/easyii-user-module) before going further

```
$ php composer.phar require developeruz/easyii-rbac-module "dev-master"
```

Replace last line in `app/config/web.php`

```
$config = array_merge_recursive($config,
    require($webroot . '/vendor/developeruz/easyii-user-module/config/user_module_config.php'),
    require($webroot . '/vendor/noumo/easyii/config/easyii.php'));
$config['components']['user'] = [ 'identityClass' => 'developeruz\easyii_user\models\User' ];
return $config;
```

with

```
$config = array_merge_recursive($config,
    require($webroot . '/vendor/developeruz/easyii-user-module/config/user_module_config.php'),
    require($webroot . '/vendor/developeruz/easyii-rbac-module/config/rbac_module_config.php'),
    require($webroot . '/vendor/noumo/easyii/config/easyii.php'));
$config['components']['user'] = [ 'identityClass' => 'developeruz\easyii_rbac\models\User' ];
return $config;
```

Add authManager to components in `app/config/console.php` and `app/config/web.php`

```
'components' => [
      ...
      'authManager' => [
        'class' => 'yii\rbac\DbManager',
      ],
]
```

Run authManager migrations

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

Run migrations

```
php yii migrate --migrationPath=@vendor/developeruz/easyii-rbac-module/migrations
```

Open User CRUD page (url `admin/user`), you will see `change user role` button in action buttons column. Click on it and assign `Admin`role to admin user.

Add behaviour in `app/config/web.php`

```
'components' => [
...
],
'modules' => [
...
],
'as AccessBehavior' => [
        'class' => \developeruz\db_rbac\behaviors\AccessBehavior::className(),
        'login_url' => '/admin/sign/in',
        'rules' => [
            'user/security' => [['actions' => ['login'], 'allow' => true ],
                                ['actions' => ['logout'], 'roles' => ['@'], 'allow' => true ]],
            'user/settings' => [['roles' => ['@'], 'allow' => true ]],
            'admin/sign' => [['actions' => ['in'], 'allow' => true],
                             ['actions' => ['out'], 'roles' => ['@'], 'allow' => true ]],

            'site' =>[[ 'allow' => true]],
            'articles' =>[[ 'allow' => true]],
            'gallery' =>[[ 'allow' => true]],
            'news' =>[[ 'allow' => true]],
        ],
]
```

Add all public controllers in `rules`.

If the user doesn't have access to admin panel, admin Toolbar will be hidden on front pages via adding css `display:none`. It is compelled workaround because [Easy yii2 cms](http://github.com/noumo/easyii) doesn't allow to overwrite this part. I will create PR and change the behavior in this module as soon as it would be possible.

License
=======

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/2b19e4f376a7fc95ccaf38274dc7768c7216d419b75b5a6da5d935c5d8521db3?d=identicon)[DeveloperUz](/maintainers/DeveloperUz)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/developeruz-easyii-rbac-module/health.svg)

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

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

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