From 9392bcadc98c123515e41b66901607bef6c5cf81 Mon Sep 17 00:00:00 2001 From: Paul-Christian Volkmer Date: Mon, 4 Mar 2024 10:12:12 +0100 Subject: [PATCH] feat: add admin role assignment --- .../dev/dnpm/etl/processor/security/UserRole.kt | 3 ++- src/main/resources/static/style.css | 12 ++++++++++-- src/main/resources/templates/configs/userroles.html | 7 ++++--- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/main/kotlin/dev/dnpm/etl/processor/security/UserRole.kt b/src/main/kotlin/dev/dnpm/etl/processor/security/UserRole.kt index 4de31f5..a1d45c8 100644 --- a/src/main/kotlin/dev/dnpm/etl/processor/security/UserRole.kt +++ b/src/main/kotlin/dev/dnpm/etl/processor/security/UserRole.kt @@ -34,7 +34,8 @@ data class UserRole( enum class Role(val value: String) { GUEST("guest"), - USER("user") + USER("user"), + ADMIN("admin") } interface UserRoleRepository : CrudRepository { diff --git a/src/main/resources/static/style.css b/src/main/resources/static/style.css index 0dd5820..a746832 100644 --- a/src/main/resources/static/style.css +++ b/src/main/resources/static/style.css @@ -449,7 +449,7 @@ td.clipboard.clipped { } .btn.btn-red:hover, .btn.btn-red:active { - background: darkred !important; + background: darkred; } .btn.btn-blue { @@ -458,7 +458,7 @@ td.clipboard.clipped { } .btn.btn-blue:hover, .btn.btn-blue:active { - background: darkslategray !important; + background: darkslategray; } .btn.btn-delete:before { @@ -466,6 +466,14 @@ td.clipboard.clipped { padding: .2rem; } +button:disabled, +.btn:disabled { + background: slategray !important; + color: lightgray; + filter: none; + cursor: default; +} + input.inline { border: none; font-size: 1.1rem; 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 @@
- + - +
- +