mirror of
https://github.com/m1k1o/neko.git
synced 2025-06-03 03:12:41 +02:00
add CanLogin check for Authenticate.
This commit is contained in:
parent
9483882c89
commit
304cb5d655
1 changed files with 4 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue