diff options
| author | Paul-Christian Volkmer | 2024-03-01 14:09:06 +0100 |
|---|---|---|
| committer | GitHub | 2024-03-01 14:09:06 +0100 |
| commit | 5928d52237cd5935fb751b3f667617e84b5bbae2 (patch) | |
| tree | 9ab899a2581ebd037320a7c951db1711392e129c /src/main/resources/templates/configs | |
| parent | 0b6decf88d9084616874d65827e7eb1e8050d1c5 (diff) | |
| parent | 1eb40b40c99b4aed31da983332e8b44275c19dd9 (diff) | |
Merge pull request #48 from CCC-MF/issue_36
Freigabe und Berechtigung für OIDC-Benutzer
Diffstat (limited to 'src/main/resources/templates/configs')
| -rw-r--r-- | src/main/resources/templates/configs/userroles.html | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/main/resources/templates/configs/userroles.html b/src/main/resources/templates/configs/userroles.html new file mode 100644 index 0000000..23cc5f2 --- /dev/null +++ b/src/main/resources/templates/configs/userroles.html @@ -0,0 +1,39 @@ +<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"> + <option th:selected="${userRole.role.value == 'guest'}" value="GUEST">Gast</option> + <option th:selected="${userRole.role.value == 'user'}" value="USER">Benutzer</option> + </select> + <button class="btn btn-blue">Ü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> + </td> + </tr> + </tbody> + </table> + </div> +</div>
\ No newline at end of file |
