fix: Debug-Logging entfernt, tenant_domains auf 132 wiederhergestellt

This commit is contained in:
sysops
2026-04-02 00:22:06 +02:00
parent caac522e3c
commit d01df2a810
+1 -14
View File
@@ -89,14 +89,8 @@ func (m *Manager) Login(username, password string) (token string, user *userstor
if domain := extractDomain(username); domain != "" {
ctx := context.Background()
tenantID, lookupErr := m.tenantLookup.GetTenantIDByDomain(ctx, domain)
if lookupErr != nil {
fmt.Printf("[DEBUG] tenant domain lookup failed for %q: %v\n", domain, lookupErr)
}
if lookupErr == nil && tenantID != nil {
tcfg, tErr := m.tenantLdapStore.GetWithPassword(ctx, *tenantID)
if tErr != nil {
fmt.Printf("[DEBUG] tenant LDAP GetWithPassword failed: %v\n", tErr)
}
if tErr == nil && tcfg != nil && tcfg.Enabled && tcfg.URL != "" && tcfg.BindPassword != "" {
attrs, authErr := ldapauth.Authenticate(ldapauth.Config{
URL: tcfg.URL,
@@ -107,11 +101,7 @@ func (m *Manager) Login(username, password string) (token string, user *userstor
TLS: tcfg.TLS,
TLSSkipVerify: tcfg.TLSSkipVerify,
}, username, password)
if authErr != nil {
fmt.Printf("[DEBUG] tenant LDAP auth failed for %q: %v\n", username, authErr)
}
if authErr == nil {
fmt.Printf("[DEBUG] tenant LDAP auth OK for %q, upserting...\n", username)
if authErr == nil {
role := tcfg.DefaultRole
if role == "" {
role = userstore.RoleUser
@@ -130,9 +120,6 @@ func (m *Manager) Login(username, password string) (token string, user *userstor
email = username
}
ldapUser, upsertErr := m.store.UpsertLDAPUser(username, email, role, tenantID)
if upsertErr != nil {
fmt.Printf("[DEBUG] UpsertLDAPUser failed for %q: %v\n", username, upsertErr)
}
if upsertErr == nil {
if ldapUser.TOTPEnabled {
t, e := m.issuePendingTOTPToken(ldapUser)