Home  >  Article  >  Backend Development  >  YII2的RBAC怎么玩?

YII2的RBAC怎么玩?

WBOY
WBOYOriginal
2016-06-06 20:35:431077browse

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

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

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

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

回复内容:

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

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

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

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

Statement:
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