Skip to content

Commit 8b8abaa

Browse files
committed
as per wxiaoguang
Signed-off-by: Andrew Thornton <[email protected]>
1 parent 4818a72 commit 8b8abaa

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

routers/web/user/auth.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -674,11 +674,7 @@ func claimValueToStringSlice(claimValue interface{}) []string {
674674
groups = rawGroup
675675
default:
676676
str := fmt.Sprintf("%s", rawGroup)
677-
if strings.Contains(str, ",") {
678-
groups = strings.Split(str, ",")
679-
} else {
680-
groups = []string{str}
681-
}
677+
groups = strings.Split(str, ",")
682678
}
683679
return groups
684680
}
@@ -714,7 +710,7 @@ func setUserGroupClaims(loginSource *login.Source, u *models.User, gothUser *got
714710
}
715711
}
716712

717-
return wasAdmin == u.IsAdmin && wasRestricted == u.IsRestricted
713+
return wasAdmin != u.IsAdmin || wasRestricted != u.IsRestricted
718714
}
719715

720716
func getUserName(gothUser *goth.User) string {

0 commit comments

Comments
 (0)