简体   繁体   English

Symfony2路由访问控制

[英]Symfony2 access control with routes

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. 我想在security.ymlaccess_control标记中限制对某些路由(而不是路径)的访问,但是我在食谱或书中什么都没找到。 Does anyone else know? 还有谁知道吗?

You can do it in many ways. 您可以通过多种方式进行操作。 For example by implementing own Security voter that will check matched route 例如,通过实现自己的安全投票器来检查匹配的路由

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM