Add sec:authorize to catalog and orders

Closes #22
This commit is contained in:
Mathis Kral 2023-11-15 18:17:27 +01:00 committed by Simon Bruder
parent 9eeb25a281
commit a276701c8a
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC
2 changed files with 3 additions and 3 deletions

View file

@ -30,7 +30,7 @@
</ul>
</td>
<td th:text="${catalogEntry.getTotalCost()}">
<td>
<td sec:authorize="hasRole('ADMIN')">
<form method="post" th:action="@{/catalog/remove}">
<input type="hidden" name="catalogEntryID" th:value="${catalogEntry.getId()}">
<button type="submit">Entfernen</button>
@ -40,7 +40,7 @@
</table>
</div>
<div>
<div sec:authorize="hasRole('ADMIN')">
<form th:action="@{/catalog_editor}">
<button type="submit">Hinzufügen</button>
</form>

View file

@ -42,7 +42,7 @@
<th:block th:text="${order.getTotalCost()}"/>
<th:block th:text="€"/>
</td>
<td>
<td sec:authorize="hasRole('ADMIN')">
<form method="post" th:action="@{/orders/remove}">
<input type="hidden" name="orderID" value="0" th:value="${order.getId()}"/>
<input type="submit" value="remove" th:value="Entfernen"/>