mirror of
https://github.com/cuigh/swirl
synced 2025-01-30 22:37:21 +00:00
Disable login of blocked users
This commit is contained in:
parent
ce196dd274
commit
70b81522fa
@ -31,6 +31,10 @@ func Validator(setting *model.Setting) func(name, pwd string) (ticket string, er
|
||||
return
|
||||
}
|
||||
|
||||
if mu != nil && mu.Status == model.UserStatusBlocked {
|
||||
return "", certify.ErrAccountDisabled
|
||||
}
|
||||
|
||||
if mu != nil && mu.Type == model.UserTypeInternal { // internal user
|
||||
if !passwd.Validate(pwd, mu.Password, mu.Salt) {
|
||||
err = certify.ErrInvalidToken
|
||||
|
Loading…
Reference in New Issue
Block a user