duanfenhui5511 2011-12-14 09:01
浏览 41
已采纳

超级用户在Yii的权利扩展中意味着什么?

I am using the rights extension of Yii and get this error:

There must be at least one superuser!

I don't know what this superuser means since I am using the default authentication with user admin and demo. After reading the documentation of rights extension, I tried to configure rights with:

'rights'=>array(
    'superuserName'=>'admin',
    'install'=>true
),

But it doesn't work, I have searched the internet but got no result.

  • 写回答

7条回答 默认 最新

  • dongxuandong2045 2012-11-22 08:37
    关注

    you need to connect the user table with a table AuthAssignment, whose name has been declared in the array setting

    'modules'=>array(
    'rights'=>array(
        'superuserName'=>'admin',
         ),
     ),
    

    then, you have to change the table AuthAssignment userid field that refer to field id on table user

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(6条)

报告相同问题?

悬赏问题

  • ¥15 在获取boss直聘的聊天的时候只能获取到前40条聊天数据
  • ¥20 关于URL获取的参数,无法执行二选一查询
  • ¥15 液位控制,当液位超过高限时常开触点59闭合,直到液位低于低限时,断开
  • ¥15 marlin编译错误,如何解决?
  • ¥15 有偿四位数,节约算法和扫描算法
  • ¥15 VUE项目怎么运行,系统打不开
  • ¥50 pointpillars等目标检测算法怎么融合注意力机制
  • ¥20 Vs code Mac系统 PHP Debug调试环境配置
  • ¥60 大一项目课,微信小程序
  • ¥15 求视频摘要youtube和ovp数据集