mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
+ CanLogin.
This commit is contained in:
parent
35cd0f5270
commit
0a201d50c8
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user