From 3fe17cb4ec0c394b6e13937e978a097fa2cae0d2 Mon Sep 17 00:00:00 2001 From: Stavros Date: Sat, 5 Jul 2025 03:02:37 +0300 Subject: [PATCH] fix: recognize ldap as a username provider --- frontend/src/pages/login-page.tsx | 4 ++-- internal/auth/auth.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/pages/login-page.tsx b/frontend/src/pages/login-page.tsx index 9f048f5..4828b38 100644 --- a/frontend/src/pages/login-page.tsx +++ b/frontend/src/pages/login-page.tsx @@ -162,9 +162,9 @@ export const LoginPage = () => { /> )} {configuredProviders.length == 0 && ( -

+

{t("failedToFetchProvidersTitle")} -

+

)} diff --git a/internal/auth/auth.go b/internal/auth/auth.go index 73312b2..8a1efe2 100644 --- a/internal/auth/auth.go +++ b/internal/auth/auth.go @@ -352,7 +352,7 @@ func (auth *Auth) GetSessionCookie(c *gin.Context) (types.SessionCookie, error) func (auth *Auth) UserAuthConfigured() bool { // If there are users, return true - return len(auth.Config.Users) > 0 + return len(auth.Config.Users) > 0 || auth.LDAP != nil } func (auth *Auth) ResourceAllowed(c *gin.Context, context types.UserContext, labels types.Labels) bool {