add logout button if logged in
This commit is contained in:
parent
428baa749c
commit
cf60740251
1 changed files with 6 additions and 2 deletions
|
@ -55,8 +55,12 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<span>
|
<span>
|
||||||
<a type="button" class="btn btn-light" href="{{ path('app_login') }}">Log in</a>
|
{% if is_granted('ROLE_USER') %}
|
||||||
</span>
|
<a type="button" class="btn btn-light" href="{{ path('app_logout') }}">Log out</a>
|
||||||
|
{% else %}
|
||||||
|
<a type="button" class="btn btn-light" href="{{ path('app_login') }}">Log in</a>
|
||||||
|
{% endif %}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
|
|
Reference in a new issue