diff options
Diffstat (limited to 'src/main/kotlin/DatabaseController.kt')
-rw-r--r-- | src/main/kotlin/DatabaseController.kt | 8 |
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) |