mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2024-12-25 12:59:06 +01:00
Retry fetching user after CanLogin
This commit is contained in:
parent
65cf86586a
commit
80aed87415
@ -211,6 +211,10 @@ func (auth *Authentication) Login(
|
|||||||
if !authenticator.CanLogin(dbUser, username, rw, r) {
|
if !authenticator.CanLogin(dbUser, username, rw, r) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
dbUser, err = auth.GetUser(username)
|
||||||
|
if err != nil && err != sql.ErrNoRows {
|
||||||
|
log.Errorf("Error while loading user '%v'", username)
|
||||||
|
}
|
||||||
|
|
||||||
user, err := authenticator.Login(dbUser, rw, r)
|
user, err := authenticator.Login(dbUser, rw, r)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user