+ CanLogin.
This commit is contained in:
parent
35cd0f5270
commit
0a201d50c8
1 changed files with 4 additions and 0 deletions
|
|
@ -22,6 +22,10 @@ func (manager *SessionManagerCtx) Authenticate(r *http.Request) (types.Session,
|
|||
return nil, fmt.Errorf("invalid password provided")
|
||||
}
|
||||
|
||||
if !session.CanLogin() {
|
||||
return nil, fmt.Errorf("login disabled")
|
||||
}
|
||||
|
||||
return session, nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue