User accounts can now be disabled
This commit is contained in:
parent
935f283589
commit
89b798e32d
@ -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",
|
||||
|
@ -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
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user