YII2的RBAC怎么玩?

WBOY
Release: 2016-06-06 20:35:43
Original
1077 people have browsed it

这个东西 看了良久,还是没懂。

我记得第一次接触RBAC的时候,框架都是

1、创建角色;
2、指定这个角色可以访问哪些方法;
3、然后给用户分配角色。。。

可是YII2我没有找到第二步怎么弄,貌似只有用代码写死这个角色的验证,那么问题来了:这货到底怎么玩的?

回复内容:

这个东西 看了良久,还是没懂。

我记得第一次接触RBAC的时候,框架都是

1、创建角色;
2、指定这个角色可以访问哪些方法;
3、然后给用户分配角色。。。

可是YII2我没有找到第二步怎么弄,貌似只有用代码写死这个角色的验证,那么问题来了:这货到底怎么玩的?

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!