mirror of
https://github.com/h44z/wg-portal.git
synced 2025-09-15 07:11:15 +00:00
fix user group parsing for OAuth login (#317)
This commit is contained in:
@@ -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:
|
||||
|
Reference in New Issue
Block a user