MCPcopy Create free account
hub / github.com/aiprodcoder/MIXAPI / GetUserUsableGroups

Function GetUserUsableGroups

setting/user_usable_group.go:45–58  ·  view source on GitHub ↗
(userGroup string)

Source from the content-addressed store, hash-verified

43}
44
45func GetUserUsableGroups(userGroup string) map[string]string {
46 groupsCopy := GetUserUsableGroupsCopy()
47 if userGroup == "" {
48 if _, ok := groupsCopy["default"]; !ok {
49 groupsCopy["default"] = "default"
50 }
51 }
52 // 如果userGroup不在UserUsableGroups中,返回UserUsableGroups + userGroup
53 if _, ok := groupsCopy[userGroup]; !ok {
54 groupsCopy[userGroup] = "用户分组"
55 }
56 // 如果userGroup在UserUsableGroups中,返回UserUsableGroups
57 return groupsCopy
58}
59
60func GroupInUserUsableGroups(groupName string) bool {
61 userUsableGroupsMutex.RLock()

Callers 4

DistributeFunction · 0.92
GetUserGroupsFunction · 0.92
GetPricingFunction · 0.92
GetUserModelsFunction · 0.92

Calls 1

GetUserUsableGroupsCopyFunction · 0.85

Tested by

no test coverage detected