fix: don't fail app if LDAP is not configured

This commit is contained in:
Stavros
2025-07-15 02:24:09 +03:00
parent 5854d973ea
commit 88d918d608

View File

@@ -133,7 +133,10 @@ var rootCmd = &cobra.Command{
SearchFilter: config.LdapSearchFilter, SearchFilter: config.LdapSearchFilter,
} }
ldapService, err = ldap.NewLDAP(ldapConfig) ldapService, err = ldap.NewLDAP(ldapConfig)
HandleError(err, "Failed to create LDAP service") if err != nil {
log.Error().Err(err).Msg("Failed to initialize LDAP service, disabling LDAP authentication")
ldapService = nil
}
} else { } else {
log.Info().Msg("LDAP not configured, using local users or OAuth") log.Info().Msg("LDAP not configured, using local users or OAuth")
} }