doubeng1278 2014-10-20 12:10
浏览 24
已采纳

在Yii中使用不同的Path到同一个控制器

I have a yii-controller handling everything under

/controllername/list/type/{something}.

The same controller should be used under a different path

/admin/controllername/list/type/{something} 

because some rights are set differently.

How can I use the same controller in both instances under Yii?

  • 写回答

1条回答 默认 最新

  • dourunlao1642 2014-10-20 13:14
    关注

    Your second url format should be a different module, you can set access control filter in controller or use RBAC for different user instead of changing url format.

    About Yii module http://www.yiiframework.com/doc-2.0/guide-structure-modules.html

    Authorization http://www.yiiframework.com/doc-2.0/guide-security-authorization.html

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 如何实现H5在QQ平台上的二次分享卡片效果?
  • ¥15 python爬取bilibili校园招聘网站
  • ¥30 求解达问题(有红包)
  • ¥15 请解包一个pak文件
  • ¥15 不同系统编译兼容问题
  • ¥100 三相直流充电模块对数字电源芯片在物理上它必须具备哪些功能和性能?
  • ¥30 数字电源对DSP芯片的具体要求
  • ¥20 antv g6 折线边如何变为钝角
  • ¥30 如何在Matlab或Python中 设置饼图的高度
  • ¥15 nginx中的CORS策略应该如何配置