+ CanLogin.

This commit is contained in:
Miroslav Šedivý 2020-12-06 18:48:50 +01:00
parent 35cd0f5270
commit 0a201d50c8

View File

@ -22,6 +22,10 @@ func (manager *SessionManagerCtx) Authenticate(r *http.Request) (types.Session,
return nil, fmt.Errorf("invalid password provided") return nil, fmt.Errorf("invalid password provided")
} }
if !session.CanLogin() {
return nil, fmt.Errorf("login disabled")
}
return session, nil return session, nil
} }