From 50b2cf32a4a920686e53bb1c26d0f3ce6e145a22 Mon Sep 17 00:00:00 2001 From: Dariusz Rozmus Date: Wed, 21 Oct 2026 18:43:25 +0200 Subject: [PATCH 1/4] Names refactoring first step --- src/WrapperApp/components/Login/LoginPanel.tsx | 12 +++++++----- src/services/AuthService.tsx | 4 ++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/WrapperApp/components/Login/LoginPanel.tsx b/src/WrapperApp/components/Login/LoginPanel.tsx index 31416ce64..58666174a 100644 --- a/src/WrapperApp/components/Login/LoginPanel.tsx +++ b/src/WrapperApp/components/Login/LoginPanel.tsx @@ -12,9 +12,11 @@ export default function LoginPanel() { const { altAuth } = useConfig(); const { localUsersEnabled } = useAuth(); const { keycloak, initialized } = useKeycloakAuth(); - const [namePasswordLoginSelected, setNamePasswordLoginSelected] = useState(!altAuth); + const [isPasswordLoginSelected, setisPasswordLoginSelected] = useState(!altAuth); // on Keycloak-only deployments the backend rejects local users, so do not offer password login - const namePasswordLogin = namePasswordLoginSelected && (localUsersEnabled || !altAuth); + const isPasswordLoginAvailable = !altAuth || localUsersEnabled === true; + + const showPasswordLoginForm = isPasswordLoginSelected && isPasswordLoginAvailable; const keycloakLogin = useCallback(() => { if (initialized && !keycloak.authenticated) keycloak.login(); @@ -39,7 +41,7 @@ export default function LoginPanel() { backgroundColor: theme.palette.accordion.main, gap: theme.spacing(1) }}> - {altAuth && !namePasswordLogin ? ( + {altAuth && !showPasswordLoginForm ? ( <> - {localUsersEnabled && ( + {isPasswordLoginAvailable && ( setisPasswordLoginSelected(true)} + onClick={() => setIsPasswordLoginSelected(true)} sx={{ cursor: 'pointer' }}> use password login @@ -72,7 +72,7 @@ export default function LoginPanel() { setisPasswordLoginSelected(false)}> + onClick={() => setIsPasswordLoginSelected(false)}> From f58e570c83ccf6bce23f960d1e9d05bd3edb1d4d Mon Sep 17 00:00:00 2001 From: Dariusz Rozmus Date: Sun, 25 Oct 2026 21:15:06 +0100 Subject: [PATCH 3/4] refactor(auth): rename altAuth config to plgridAuthEnabled --- src/WrapperApp/components/Login/LoginPanel.tsx | 10 +++++----- src/config/ConfigService.tsx | 8 ++++---- src/services/KeycloakAuthService.tsx | 10 +++++----- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/WrapperApp/components/Login/LoginPanel.tsx b/src/WrapperApp/components/Login/LoginPanel.tsx index 441c86abe..dd8871d5e 100644 --- a/src/WrapperApp/components/Login/LoginPanel.tsx +++ b/src/WrapperApp/components/Login/LoginPanel.tsx @@ -9,12 +9,12 @@ import NamePasswordLoginPanel from './NamePasswordLoginPanel'; export default function LoginPanel() { const theme = useTheme(); - const { altAuth } = useConfig(); + const { plgridAuthEnabled } = useConfig(); const { localUsersEnabled } = useAuth(); const { keycloak, initialized } = useKeycloakAuth(); - const [isPasswordLoginSelected, setIsPasswordLoginSelected] = useState(!altAuth); + const [isPasswordLoginSelected, setIsPasswordLoginSelected] = useState(!plgridAuthEnabled); // on Keycloak-only deployments the backend rejects local users, so do not offer password login - const isPasswordLoginAvailable = !altAuth || localUsersEnabled === true; + const isPasswordLoginAvailable = !plgridAuthEnabled || localUsersEnabled === true; const showPasswordLoginForm = isPasswordLoginSelected && isPasswordLoginAvailable; @@ -41,7 +41,7 @@ export default function LoginPanel() { backgroundColor: theme.palette.accordion.main, gap: theme.spacing(1) }}> - {altAuth && !showPasswordLoginForm ? ( + {plgridAuthEnabled && !showPasswordLoginForm ? ( <>