Skip to content

Commit 7fd0b9e

Browse files
committed
Fix groups saving to session
1 parent b0e2750 commit 7fd0b9e

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

internal/server/sso_auth.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -377,12 +377,8 @@ func (s *SSOAuth) CheckAuth(w http.ResponseWriter, r *http.Request, appProvider
377377

378378
groups := make([]string, 0)
379379
if raw, ok := session.Values[GROUPS_KEY]; ok {
380-
if arr, ok := raw.([]any); ok {
381-
for _, v := range arr {
382-
if s, ok := v.(string); ok {
383-
groups = append(groups, s)
384-
}
385-
}
380+
if arr, ok := raw.([]string); ok {
381+
groups = arr
386382
}
387383
}
388384

0 commit comments

Comments
 (0)