带路由的 Symfony2 访问控制 [英] Symfony2 access control with routes
本文介绍了带路由的 Symfony2 访问控制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在 security.yml
的 access_control
标签中限制对某些路由(不是路径)的访问,但我在食谱或书中没有找到任何显示我的内容如何.还有人知道吗?
I want to limit access to certain routes (not paths) in the access_control
tag in security.yml
, but I found nothing in the cookbook or book that shows me how to.
Does anyone else know?
推荐答案
您可以通过多种方式实现.例如通过实现自己的安全投票者来检查匹配的路由
You can do it in many ways. For example by implementing own Security voter that will check matched route
这篇关于带路由的 Symfony2 访问控制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文