mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
add LockedLogins to settings.
This commit is contained in:
@ -141,6 +141,10 @@ func (manager *MemberManagerCtx) Login(username string, password string) (types.
|
||||
return nil, "", err
|
||||
}
|
||||
|
||||
if !profile.IsAdmin && manager.sessions.Settings().LockedLogins {
|
||||
return nil, "", types.ErrSessionLoginsLocked
|
||||
}
|
||||
|
||||
session, ok := manager.sessions.Get(id)
|
||||
if ok {
|
||||
if session.State().IsConnected {
|
||||
|
Reference in New Issue
Block a user