Symfony2路由访问控制 [英] Symfony2 access control with routes

查看:70
本文介绍了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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆