Answer the question
In order to leave comments, you need to log in
How can I remove the log-in case when the user has already logged in?
How can I write tags in JSP so that the log in link disappears during authorization ?
I tried like this, but it didn't work:
<sec:authorize access="!hasRole('ROLE_ADMIN') || !hasRole('ROLE_MANAGER') || !hasRole('ROLE_USER') || getRole()">
<a href="/login">Log in</a>
</sec:authorize>
<sec:authorize access="hasRole('ROLE_ADMIN') || hasRole('ROLE_MANAGER') || hasRole('ROLE_USER')">
<a href="#">Log out</a>
</sec:authorize>
Answer the question
In order to leave comments, you need to log in
<sec:authorize access="!isAuthenticated()">
<a href="/login">Log in</a>
</sec:authorize>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question