Fixed use of newLDAPUser
This commit is contained in:
@@ -151,9 +151,9 @@ func (c *Controller) WithUser(next http.Handler) http.Handler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
var credsOk bool
|
var credsOk bool
|
||||||
if tokenAuth && newLDAPUser {
|
if tokenAuth && !newLDAPUser {
|
||||||
credsOk = checkCredsToken(user.Password, token, salt)
|
credsOk = checkCredsToken(user.Password, token, salt)
|
||||||
} else if newLDAPUser {
|
} else if !newLDAPUser {
|
||||||
credsOk = checkCredsBasic(user.Password, password)
|
credsOk = checkCredsBasic(user.Password, password)
|
||||||
}
|
}
|
||||||
if !credsOk {
|
if !credsOk {
|
||||||
|
|||||||
Reference in New Issue
Block a user