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 = "",
|
open var email: String = "",
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
open var password: String = "",
|
open var password: String = "",
|
||||||
|
@JsonIgnore
|
||||||
|
open var enabled: Boolean = true,
|
||||||
|
@JsonIgnore
|
||||||
@ManyToMany
|
@ManyToMany
|
||||||
@JoinTable(
|
@JoinTable(
|
||||||
name = "user_roles",
|
name = "user_roles",
|
||||||
|
@ -43,7 +43,7 @@ class CustomUserDetails(private val user: User) : UserDetails {
|
|||||||
|
|
||||||
override fun isCredentialsNonExpired(): Boolean = true
|
override fun isCredentialsNonExpired(): Boolean = true
|
||||||
|
|
||||||
override fun isEnabled(): Boolean = true
|
override fun isEnabled(): Boolean = user.enabled
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user