Fixed use of newLDAPUser

This commit is contained in:
beta
2023-09-09 09:48:54 -07:00
parent e7d6fdab69
commit 7de6cf1e9e
+2 -2
View File
@@ -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 {