fix user group parsing for OAuth login (#317)

This commit is contained in:
Christoph Haas
2025-01-21 17:33:01 +01:00
parent 7a0a2117f5
commit a04eaa4bfb
3 changed files with 73 additions and 1 deletions

View File

@@ -88,6 +88,17 @@ func MapDefaultStringSlice(m map[string]interface{}, key string, dflt []string)
return dflt
} else {
switch v := tmp.(type) {
case []any:
result := make([]string, 0, len(v))
for _, elem := range v {
switch vElem := elem.(type) {
case string:
result = append(result, vElem)
default:
result = append(result, fmt.Sprintf("%v", vElem))
}
}
return result
case []string:
return v
case string: