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>
|
||||
</ul>
|
||||
<span>
|
||||
<a type="button" class="btn btn-light" href="{{ path('app_login') }}">Log in</a>
|
||||
</span>
|
||||
{% if is_granted('ROLE_USER') %}
|
||||
<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>
|
||||
</nav>
|
||||
|
||||
|
|
Reference in a new issue