I'm trying to hide a button in the header of my Spingboot application in the following way with my markup:
<!-- Is not logged in, so don't show "Log In" -->
<li sec:authorize="!isAuthenticated()">
<a href="/login" th:href="@{/login}" class="btn-login">Log In</a>
</li>\
You can use simple if's: http://www.thymeleaf.org/doc/tutorials/2.1/usingthymeleaf.html#simple-conditionals-if-and-unless
But you have to put the objects, you use in the if's, before into the (Spring) Model