douwu7563 2015-06-25 11:15
浏览 65

您可以使用RBAC为每个组设置个人权限吗?

I have been investigating the best method to create a complex permission based system and I am using the Yii2 framework and noticed it includes good RBAC support, however I am not sure if it is right for my situation.

What I am looking for I guess is similar to what a forum system would use where you can make groups and then you can select what permissions each of those groups are allowed to do.

I have noticed that with RBAC that you add your roles and if you add and admin and a author for example you can then add the author as a child of admin and then admin can do everything authors can + whatever other permissions you give them.

Do you have to do it like this or can you do all the permissions separately? Is adding the author as a child of admin just a quicker/cleaner way to give admin all the same permissions a lower level group has and then you can then add extra permissions on top?

I worry about doing it this way though because what if you remove a permission from the author, then all of a sudden the admin will lose that permission to unless they gain it from another child or are given it separately.

Can I still utilise RBAC for my needs or should I look at doing something custom?

  • 写回答

1条回答 默认 最新

  • dpka7974 2015-06-25 12:55
    关注

    The RBAC system of Yii2 is very powerful, you can effectly add yor group pemission to a parent and later if need to revoke a single permission the the child group you can add what you need only when and how you need.

    评论

报告相同问题?

悬赏问题

  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 划分vlan后不通了
  • ¥15 GDI处理通道视频时总是带有白色锯齿
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)
  • ¥15 自适应 AR 模型 参数估计Matlab程序
  • ¥100 角动量包络面如何用MATLAB绘制
  • ¥15 merge函数占用内存过大
  • ¥15 使用EMD去噪处理RML2016数据集时候的原理
  • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大