mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
add CanLogin check for Authenticate.
This commit is contained in:
parent
9483882c89
commit
304cb5d655
@ -19,6 +19,10 @@ func (manager *SessionManagerCtx) Authenticate(r *http.Request) (types.Session,
|
||||
return nil, fmt.Errorf("session not found")
|
||||
}
|
||||
|
||||
if !session.Profile().CanLogin {
|
||||
return nil, fmt.Errorf("login disabled")
|
||||
}
|
||||
|
||||
return session, nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user