summaryrefslogtreecommitdiff
path: root/src/main/resources/templates/configs
diff options
context:
space:
mode:
authorPaul-Christian Volkmer2024-03-04 12:54:31 +0100
committerGitHub2024-03-04 12:54:31 +0100
commitb332f3c5ff706bd3ef792365583a162e79a66a3e (patch)
treeb279f1df3130a13bcfd9f79954435284465c019e /src/main/resources/templates/configs
parenta008641192be4fce50fcac31be02cd035964eafe (diff)
parent9eb65788e152c8c34eb2ed0d54ca2f9582e7511b (diff)
Merge pull request #50 from CCC-MF/issue_49
Administrative Rechte für OIDC-Benutzer
Diffstat (limited to 'src/main/resources/templates/configs')
-rw-r--r--src/main/resources/templates/configs/userroles.html7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/resources/templates/configs/userroles.html b/src/main/resources/templates/configs/userroles.html
index 23cc5f2..f5e4586 100644
--- a/src/main/resources/templates/configs/userroles.html
+++ b/src/main/resources/templates/configs/userroles.html
@@ -21,16 +21,17 @@
<td>
<div class="userrole-form">
<form th:hx-put="@{/configs/userroles/{id}(id=${userRole.id})}" hx-target="#userroles">
- <select name="role">
+ <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">Übernehmen</button>
+ <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">Löschen</button>
+ <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>