fix #663
This commit is contained in:
1 parent
6093ae6f30
commit
05e389fe6a
2 files changed
+18
-34
No files matched your search
@@ -34,8 +34,9 @@ func UpdateUserUsableGroupsByJSONString(jsonStr string) error {
|
||||
func GetUserUsableGroups(userGroup string) map[string]string {
|
||||
groupsCopy := GetUserUsableGroupsCopy()
|
||||
if userGroup == "" {
|
||||
// 如果userGroup为空,返回UserUsableGroups
|
||||
return groupsCopy
|
||||
if _, ok := groupsCopy["default"]; !ok {
|
||||
groupsCopy["default"] = "default"
|
||||
}
|
||||
}
|
||||
// 如果userGroup不在UserUsableGroups中,返回UserUsableGroups + userGroup
|
||||
if _, ok := groupsCopy[userGroup]; !ok {
|
||||
|
||||
Reference in new issue
Block a user