mirror of
https://github.com/pcvolkmer/etl-processor.git
synced 2025-04-19 17:26:51 +00:00
40 lines
2.1 KiB
HTML
40 lines
2.1 KiB
HTML
<div th:if="${not userRolesEnabled}">
|
|
<h2><span>⛔</span> Benutzerberechtigungen</h2>
|
|
<p>Die Verwendung von rollenbasierten Benutzerberechtigungen ist nicht aktiviert.</p>
|
|
</div>
|
|
|
|
<div id="userroles" th:if="${userRolesEnabled}">
|
|
<h2><span>✅</span> Benutzerberechtigungen</h2>
|
|
<div class="border">
|
|
<div th:if="${userRoles.isEmpty()}">Noch keine Benutzerberechtigungen vorhanden.</div>
|
|
<table th:if="${not userRoles.isEmpty()}">
|
|
<thead>
|
|
<tr>
|
|
<th>Benutzername</th>
|
|
<th>Rolle</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr th:each="userRole : ${userRoles}">
|
|
<td>[[ ${userRole.username} ]]</td>
|
|
<td>
|
|
<div class="userrole-form">
|
|
<form th:hx-put="@{/configs/userroles/{id}(id=${userRole.id})}" hx-target="#userroles">
|
|
<select name="role" th:disabled="${#authorization.authentication.getName() == userRole.username}">
|
|
<option th:selected="${userRole.role.value == 'guest'}" value="GUEST">Gast</option>
|
|
<option th:selected="${userRole.role.value == 'user'}" value="USER">Benutzer</option>
|
|
<option th:selected="${userRole.role.value == 'admin'}" value="ADMIN">Administrator</option>
|
|
</select>
|
|
<button class="btn btn-blue" th:disabled="${#authorization.authentication.getName() == userRole.username}">Übernehmen</button>
|
|
</form>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<button class="btn btn-red" th:hx-delete="@{/configs/userroles/{id}(id=${userRole.id})}" hx-target="#userroles" th:disabled="${#authorization.authentication.getName() == userRole.username}">Löschen</button>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div> |