check role user exists in list symfony code example Example: check if user has role twig {% if is_granted('ROLE_ADMIN') %} ... {% endif %}