Fix else if (gocritic)
This commit is contained in:
@@ -153,11 +153,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 {
|
} else if newLDAPUser {
|
||||||
if newLDAPUser {
|
|
||||||
credsOk = checkCredsBasic(user.Password, password)
|
credsOk = checkCredsBasic(user.Password, password)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if !credsOk {
|
if !credsOk {
|
||||||
// Because internal authentication failed, we can now try to use LDAP, if
|
// Because internal authentication failed, we can now try to use LDAP, if
|
||||||
// it was enabled by the user.
|
// it was enabled by the user.
|
||||||
|
|||||||
Reference in New Issue
Block a user