fix: username provider appearing when no auth is configured#568
Conversation
…for non-envoy proxies
📝 WalkthroughWalkthroughA parameter in the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🔇 Additional comments (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #568 +/- ##
=======================================
Coverage 19.25% 19.25%
=======================================
Files 39 39
Lines 2295 2295
=======================================
Hits 442 442
Misses 1825 1825
Partials 28 28 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
AI Summary
Fixes a bug where the username authentication provider would incorrectly appear in the login UI when neither local users nor LDAP were successfully configured, but only OAuth providers were set up.
Root Cause: When LDAP initialization failed, a non-nil (but uninitialized) LDAP service was being passed to AuthService, causing
UserAuthConfigured()to return true.Fix: Pass
services.ldapService(which is nil when init fails) instead of the localldapServicevariable to AuthService constructor in service_bootstrap.go line 69.Impact: Username provider now only appears when users are configured or LDAP successfully initializes.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.