From bbc828fa358ea1820cdaeabd1f0b0f6562ab0e80 Mon Sep 17 00:00:00 2001 From: Leopere Date: Tue, 3 Mar 2026 18:11:31 -0500 Subject: [PATCH] Fall back to LDAP group check when Authelia session is stale The Remote-Groups header reflects groups at login time. If a user was added to 'customers' after logging in (via /activate), the dashboard would show "No Active Subscription". Now checks LDAP directly as fallback. Made-with: Cursor --- docker/ss-atlas/internal/handlers/dashboard.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docker/ss-atlas/internal/handlers/dashboard.go b/docker/ss-atlas/internal/handlers/dashboard.go index 48e3dae..437bbf9 100644 --- a/docker/ss-atlas/internal/handlers/dashboard.go +++ b/docker/ss-atlas/internal/handlers/dashboard.go @@ -15,6 +15,14 @@ func (a *App) handleDashboard(w http.ResponseWriter, r *http.Request) { remoteGroups := r.Header.Get("Remote-Groups") isSubscribed := remoteGroups != "" && contains(remoteGroups, "customers") + // Authelia session may be stale (user was added to customers after login). + if !isSubscribed && remoteUser != "" { + inGroup, _ := a.ldap.IsInGroup(remoteUser, "customers") + if inGroup { + isSubscribed = true + } + } + var customerID string stackDeployed := false stackRunning := false