diff --git a/src/main/kotlin/uk/co/neviyn/booru/Entity.kt b/src/main/kotlin/uk/co/neviyn/booru/Entity.kt index 5c4da6b..047de0c 100644 --- a/src/main/kotlin/uk/co/neviyn/booru/Entity.kt +++ b/src/main/kotlin/uk/co/neviyn/booru/Entity.kt @@ -16,6 +16,9 @@ open class User( open var email: String = "", @JsonIgnore open var password: String = "", + @JsonIgnore + open var enabled: Boolean = true, + @JsonIgnore @ManyToMany @JoinTable( name = "user_roles", diff --git a/src/main/kotlin/uk/co/neviyn/booru/Security.kt b/src/main/kotlin/uk/co/neviyn/booru/Security.kt index 4ca697e..08846a2 100644 --- a/src/main/kotlin/uk/co/neviyn/booru/Security.kt +++ b/src/main/kotlin/uk/co/neviyn/booru/Security.kt @@ -43,7 +43,7 @@ class CustomUserDetails(private val user: User) : UserDetails { override fun isCredentialsNonExpired(): Boolean = true - override fun isEnabled(): Boolean = true + override fun isEnabled(): Boolean = user.enabled }