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

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

suliang/yii2-extjs-rbac
=======================

Yii2 ExtJs5 RBAC

1.0.7(7y ago)021MITPHPPHP &gt;=5.4.0

Since Dec 13Pushed 7y ago1 watchersCompare

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

READMEChangelog (2)Dependencies (3)Versions (5)Used By (1)

Yii2 ExtJs5 RBAC
================

[](#yii2-extjs5-rbac)

支持ACL+RBAC

github:

[![Latest Stable Version](https://camo.githubusercontent.com/e9bfadeec91783e850b496a0f0df4729c37d00e42aa73195c4c660049c421457/68747470733a2f2f706f7365722e707567782e6f72672f6d797765697368616e6c692f796969322d6578746a732d726261632f762f737461626c652e706e67)](https://packagist.org/packages/myweishanli/yii2-extjs-rbac)[![Total Downloads](https://camo.githubusercontent.com/36829bc69923f0cb7943c7626ebe3f46e8554be28df2e152d4990d3c43346ff6/68747470733a2f2f706f7365722e707567782e6f72672f6d797765697368616e6c692f796969322d6578746a732d726261632f646f776e6c6f6164732e706e67)](https://packagist.org/packages/myweishanli/yii2-extjs-rbac)

> 注: 功能正在开发中...

> 更详细的配置说明文档正在编写中...

> QQ群: 137158108 验证信息: github

> 有任何疑问可以发邮件到

WebUIPreview加载页面加载完成管理员帐号[![加载页面](https://github.com/myweishanli/yii2-extjs-rbac/raw/master/docs/images/1.png?raw=true)](https://github.com/myweishanli/yii2-extjs-rbac/blob/master/docs/images/1.png?raw=true)[![加载完成](https://github.com/myweishanli/yii2-extjs-rbac/raw/master/docs/images/2.png?raw=true)](https://github.com/myweishanli/yii2-extjs-rbac/blob/master/docs/images/2.png?raw=true)[![管理员帐号](https://github.com/myweishanli/yii2-extjs-rbac/raw/master/docs/images/3.png?raw=true)](https://github.com/myweishanli/yii2-extjs-rbac/blob/master/docs/images/3.png?raw=true)高级搜索编辑帐号用户组管理[![高级搜索](https://github.com/myweishanli/yii2-extjs-rbac/raw/master/docs/images/4.png?raw=true)](https://github.com/myweishanli/yii2-extjs-rbac/blob/master/docs/images/4.png?raw=true)[![编辑帐号](https://github.com/myweishanli/yii2-extjs-rbac/raw/master/docs/images/5.png?raw=true)](https://github.com/myweishanli/yii2-extjs-rbac/blob/master/docs/images/5.png?raw=true)[![用户组管理](https://github.com/myweishanli/yii2-extjs-rbac/raw/master/docs/images/6.png?raw=true)](https://github.com/myweishanli/yii2-extjs-rbac/blob/master/docs/images/6.png?raw=true)编辑用户组管理菜单管理菜单管理URL管理[![编辑用户组管理](https://github.com/myweishanli/yii2-extjs-rbac/raw/master/docs/images/7.png?raw=true)](https://github.com/myweishanli/yii2-extjs-rbac/blob/master/docs/images/7.png?raw=true)[![菜单管理](https://github.com/myweishanli/yii2-extjs-rbac/raw/master/docs/images/8.png?raw=true)](https://github.com/myweishanli/yii2-extjs-rbac/blob/master/docs/images/8.png?raw=true)[![菜单管理URL管理](https://github.com/myweishanli/yii2-extjs-rbac/raw/master/docs/images/9.png?raw=true)](https://github.com/myweishanli/yii2-extjs-rbac/blob/master/docs/images/9.png?raw=true)编辑菜单管理URL编辑菜单管理URL规则系统配置[![编辑菜单管理URL](https://github.com/myweishanli/yii2-extjs-rbac/raw/master/docs/images/10.png?raw=true)](https://github.com/myweishanli/yii2-extjs-rbac/blob/master/docs/images/10.png?raw=true)[![编辑菜单管理URL规则](https://github.com/myweishanli/yii2-extjs-rbac/raw/master/docs/images/11.png?raw=true)](https://github.com/myweishanli/yii2-extjs-rbac/blob/master/docs/images/11.png?raw=true)[![系统配置](https://github.com/myweishanli/yii2-extjs-rbac/raw/master/docs/images/12.png?raw=true)](https://github.com/myweishanli/yii2-extjs-rbac/blob/master/docs/images/12.png?raw=true)[更多预览图](docs/preview.md)

---

有任何建议或者需求欢迎来反馈 [issues](../../issues)

欢迎点击右上方的 star 收藏

fork 参与开发，欢迎提交 Pull Requests，然后 Pull Request

---

1、安装
----

[](#1安装)

安装这个扩展的首选方式是通过 [composer](http://getcomposer.org/download/).

执行命令

```
composer global require "fxp/composer-asset-plugin:~1.1.0"
composer require --prefer-dist myweishanli/yii2-extjs-rbac
```

或添加

```
"myweishanli/yii2-extjs-rbac": "~1.0.0"
```

如果无法通过`composer`安装可以下载离线包 [离线包安装向导](docs/offline-install.md)

2、配置
----

[](#2配置)

`@app/config/main.php`

`@app`指你应用的目录 比如你访问的是`backend/web/index.php`那么你就配置`backend/config/main.php`即可 反之你访问的是`frontend/web/index.php`那么你就配置`frontend/config/main.php`即可

高级版是`main.php`

基础版是`web.php`

```
'modules' => [
    // ...
    'admin' => '\wsl\rbac\modules\admin\Module',
],
'controllerMap' => [
    // ...
    'site' => '\wsl\rbac\controllers\SiteController',
],
'components' => [
    // ...
    'user' => [
        'identityClass' => 'wsl\rbac\models\DpAdminUser',
        // ...
    ],
]
```

配置预览
----

[](#配置预览)

[![](https://github.com/myweishanli/yii2-extjs-rbac/raw/master/docs/images/config-preview.png?raw=true)](https://github.com/myweishanli/yii2-extjs-rbac/blob/master/docs/images/config-preview.png?raw=true)

3、导入数据
------

[](#3导入数据)

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

完成`配置`和`导入数据`即可访问

> 注意：windows系统Apache或者集成环境XAMPP、WAMP请使用 以管理员身份运行，否则会出现一直加载中的情况（如果非管理员访问过请删除backend\\web\\assets\\dp目录）

[一直显示加载中解决](https://www.heguo.org/blog/yii2-extjs-rbac/article/397)

超级管理员帐号和密码
----------

[](#超级管理员帐号和密码)

```
username: drupecms
password: drupecms

```

控制器
---

[](#控制器)

新建的`Controller`需要继承`\wsl\rbac\base\Controller`

```
class ExampleController extends \wsl\rbac\base\Controller
{
}
```

自定义配置
-----

[](#自定义配置)

```
'controllerMap' => [
    'site' => [
        'class' => '\wsl\rbac\controllers\SiteController',
        // 'extJs' => [ // 按需配置,未配置的key会使用默认值
        //     'path' => '/dp/extjs', // ExtJs符号连接路径
        //     'extendPath' => '/dp/extjs-extend', // ExtJs扩展符号连接路径
        //     'appJsPath' => '/app.js', // app.js路径
        //     'bootstrapJsPath' => '/dp/extjs-extend/bootstrap.js', // bootstrap.js路径
        //     'bootstrapJsonPath' => '/dp/extjs-extend/bootstrap.json', // bootstrap.json路径
        //     'bootstrapCssPath' => '/dp/extjs/packages/ext-theme-crisp/build/resources/ext-theme-crisp-all.css', // bootstrap.css路径
        // ],
    ],
    // ...
],
```

> 注: 每次升级记住执行`yii migrate --migrationPath=@wsl/rbac/migrations`

捐赠
--

[](#捐赠)

**微信**

[![微信支付](https://github.com/myweishanli/yii2-extjs-rbac/raw/master/docs/images/wechat-pay.png?raw=true)](https://github.com/myweishanli/yii2-extjs-rbac/blob/master/docs/images/wechat-pay.png?raw=true)

或者

**支付宝**

[![支付宝支付](https://github.com/myweishanli/yii2-extjs-rbac/raw/master/docs/images/ali-pay.png?raw=true)](https://github.com/myweishanli/yii2-extjs-rbac/blob/master/docs/images/ali-pay.png?raw=true)

手机微信或者支付宝扫描上方二维码可向本项目捐款

所得捐赠将用于改善网站服务器、购买开发/调试设备&amp;工具。

示例
--

[](#示例)

> 更多示例正在添加中...

- [编写一个Hello World](docs/example/hello-world/hello-world.md)
- [自定义命名空间](docs/example/custom-namespace/custom-namespace.md)
- [自定义登录页面](docs/example/custom-login-page/custom-login-page.md)

建议反馈:

**正在编写**

- 目录结构说明
- 使用已封装CRUD
- 扩展功能

正在开发新功能
-------

[](#正在开发新功能)

- ip访问限制
- 权限设置细化到每个url
- gii代码生成器

更新日志
----

[](#更新日志)

### Version Dev Master

[](#version-dev-master)

- 静态文件默认符号连接修改到`assets`目录

### Version 1.0.5 (2016.1.12)

[](#version-105-2016112)

- 修复拖拽菜单排序
- 兼容非web目录访问

### Version 1.0.4 (2015.12.13)

[](#version-104-20151213)

- 修复Ubuntu下通过Windows共享目录无法建立符号连接
- 添加公共路由配置

### Version 1.0.3 (2015.12.08)

[](#version-103-20151208)

- 兼容PHP5.4+
- 新增自定义静态文件路径
- 新增底部工具栏添加debug调试按钮
- 修复高级搜索状态切换bug

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 99.4% 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 ~304 days

Total

4

Last Release

2890d ago

### Community

Maintainers

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

---

Top Contributors

[![daycats](https://avatars.githubusercontent.com/u/3991317?v=4)](https://github.com/daycats "daycats (155 commits)")[![suliang20](https://avatars.githubusercontent.com/u/11628211?v=4)](https://github.com/suliang20 "suliang20 (1 commits)")

---

Tags

rbacyii2extjs5

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/suliang-yii2-extjs-rbac/health.svg)](https://phpackages.com/packages/suliang-yii2-extjs-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)
