aboutsummaryrefslogtreecommitdiff
path: root/juick-spring-www/src/main/webapp/WEB-INF/templates/layout/partial/navigation.html
diff options
context:
space:
mode:
authorGravatar Alexander Alexeev2016-12-12 20:58:12 +0700
committerGravatar Vitaly Takmazov2016-12-12 22:49:47 +0300
commit415b0ec7da02c07aad8fe85cfe0610ba9f4e5bd4 (patch)
treeb7de01f7925a65a6b569da5e8036552cc31a470c /juick-spring-www/src/main/webapp/WEB-INF/templates/layout/partial/navigation.html
parent59fd361edab0f28991e9ded0c87ed70b7011001c (diff)
using thymeleaf spring security extension
Diffstat (limited to 'juick-spring-www/src/main/webapp/WEB-INF/templates/layout/partial/navigation.html')
-rw-r--r--juick-spring-www/src/main/webapp/WEB-INF/templates/layout/partial/navigation.html8
1 files changed, 4 insertions, 4 deletions
diff --git a/juick-spring-www/src/main/webapp/WEB-INF/templates/layout/partial/navigation.html b/juick-spring-www/src/main/webapp/WEB-INF/templates/layout/partial/navigation.html
index 95714e10..c7cd1c81 100644
--- a/juick-spring-www/src/main/webapp/WEB-INF/templates/layout/partial/navigation.html
+++ b/juick-spring-www/src/main/webapp/WEB-INF/templates/layout/partial/navigation.html
@@ -20,8 +20,8 @@
th:value="${param.search}"/>
</form>
</div>
- <section id="headdiv" th:switch="${visitor.isAnonym()}">
- <th:block th:case="false">
+ <section id="headdiv">
+ <th:block th:if="${#authorization.expression('hasRole(''ROLE_USER'')')}">
<nav id="user">
<ul>
<li><a href="/?show=my" th:href="@{/?show=my}" th:text="#{link.my}">Моя лента</a></li>
@@ -35,13 +35,13 @@
<nav id="actions">
<ul>
<li><a href="/#post" th:href="@{/#post}" th:text="#{link.postMessage}">Написать</a></li>
- <li><a href="/ugnich" th:href="@{/{userName}(userName=${visitor.name})}" th:text="'@'+${visitor.name}">@ugnich</a></li>
+ <li><a href="/ugnich" th:href="@{/{userName}(userName=${#authentication.name})}" th:text="'@'+${#authentication.name}">@ugnich</a></li>
<li><a href="/settings" th:href="@{/settings}" th:text="#{link.settings}" rel="nofollow">Настройки</a></li>
<li><a href="/logout" th:href="@{/logout}" th:text="#{link.logout}">Выйти</a></li>
</ul>
</nav>
</th:block>
- <th:block th:case="true">
+ <th:block th:if="${#authorization.expression('hasRole(''ROLE_ANONYM'')')}">
<p>[(#{message.loginForSending(@{/login})})]</p>
</th:block>
</section>