Fix else if (gocritic)

This commit is contained in:
BetaPictoris
2023-08-06 03:02:13 -07:00
parent 9c56bf61ab
commit 1fd8c9b2c3
+2 -4
View File
@@ -153,10 +153,8 @@ func (c *Controller) WithUser(next http.Handler) http.Handler {
var credsOk bool
if tokenAuth && newLDAPUser {
credsOk = checkCredsToken(user.Password, token, salt)
} else {
if newLDAPUser {
credsOk = checkCredsBasic(user.Password, password)
}
} else if newLDAPUser {
credsOk = checkCredsBasic(user.Password, password)
}
if !credsOk {
// Because internal authentication failed, we can now try to use LDAP, if