Is there a way in Symfony2 to check if user has access to specified url inside Twig template?
Something like this:
{% if user_has_access( '/some/url/to/access' ) %}
<a href="{{ path( '/some/url/to/access' ) }}">You can come here</a>
{% endif %}
Like Paweł Brzoski explained, it's possible to create a custom twig function.
But in Symfony, the correct way is to use is_granted('ROLE_...')