aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/DatabaseController.kt
diff options
context:
space:
mode:
authorMarvin Borner2019-04-18 22:08:26 +0200
committerMarvin Borner2019-04-18 22:08:26 +0200
commit551868000825ebbe037b1be494679b24c2f0fcac (patch)
treed280dcd86b3417a7bf3fcfc6b74d5c44484b4f77 /src/main/kotlin/DatabaseController.kt
parent8c85eef4dd56b6a2d4a2563c5634dc2c60a35370 (diff)
Added better setup process redirection
Co-authored-by: LarsVomMars <lars@kroenner.eu>
Diffstat (limited to 'src/main/kotlin/DatabaseController.kt')
-rw-r--r--src/main/kotlin/DatabaseController.kt8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/kotlin/DatabaseController.kt b/src/main/kotlin/DatabaseController.kt
index c21b175..51179e8 100644
--- a/src/main/kotlin/DatabaseController.kt
+++ b/src/main/kotlin/DatabaseController.kt
@@ -185,15 +185,15 @@ class DatabaseController(dbFileLocation: String = "main.db") {
val userRoles = mutableListOf<Roles>()
RolesData.select { RolesData.id eq userRoleId }.map { it[RolesData.role] }.forEach {
- when (it) {
- "GUEST" -> {
+ when (Roles.valueOf(it)) {
+ Roles.GUEST -> {
userRoles.add(Roles.GUEST)
}
- "USER" -> {
+ Roles.USER -> {
userRoles.add(Roles.GUEST)
userRoles.add(Roles.USER)
}
- "ADMIN" -> {
+ Roles.ADMIN -> {
userRoles.add(Roles.GUEST)
userRoles.add(Roles.USER)
userRoles.add(Roles.ADMIN)