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")
|
return nil, fmt.Errorf("session not found")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !session.Profile().CanLogin {
|
||||||
|
return nil, fmt.Errorf("login disabled")
|
||||||
|
}
|
||||||
|
|
||||||
return session, nil
|
return session, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue