diff options
Diffstat (limited to 'src/main/resources/templates/fragments.html')
| -rw-r--r-- | src/main/resources/templates/fragments.html | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/main/resources/templates/fragments.html b/src/main/resources/templates/fragments.html index 677e841..7a9af2f 100644 --- a/src/main/resources/templates/fragments.html +++ b/src/main/resources/templates/fragments.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html xmlns:th="http://www.thymeleaf.org"> +<html xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org"> <head> <meta charset="UTF-8"> <link rel="stylesheet" th:href="@{/style.css}" /> @@ -14,7 +14,15 @@ <ul> <li><a th:href="@{/}">Übersicht</a></li> <li><a th:href="@{/statistics}">Statistiken</a></li> - <li><a th:href="@{/configs}">Konfiguration</a></li> + <li sec:authorize="hasRole('ADMIN')"> + <a th:href="@{/configs}">Konfiguration</a> + </li> + <li class="login" sec:authorize="not isAuthenticated()"> + <a th:href="@{/login}">Login</a> + </li> + <li class="login" sec:authorize="isAuthenticated()"> + <a th:href="@{/logout}">Abmelden</a> + </li> </ul> </nav> </div> |
