Symfony2 security features in Twig? How to check the user role?

I have a standard version of Symfony 2.0.9 installed with JMSSecurityBundle. Just wondering what features are available to me in the Twig template for working with users?

In particular, I want to check if the user has the ROLE_ADMIN role.

Any help?

thank

+62
symfony twig
Jan 10 2018-12-12T00:
source share
1 answer
{% if is_granted('ROLE_ADMIN') %} ... {% endif %} 
+193
Jan 10 '12 at 21:40
source share



All Articles