mirror of
https://github.com/linux-do/new-api.git
synced 2025-11-10 08:03:41 +08:00
fix: 修复用户可选分组不能选择用户分组 (close #528)
This commit is contained in:
@@ -42,7 +42,7 @@ func Distribute() func(c *gin.Context) {
|
||||
tokenGroup := c.GetString("token_group")
|
||||
if tokenGroup != "" {
|
||||
// check common.UserUsableGroups[userGroup]
|
||||
if _, ok := common.UserUsableGroups[tokenGroup]; !ok {
|
||||
if _, ok := common.GetUserUsableGroups(userGroup)[tokenGroup]; !ok {
|
||||
abortWithOpenAiMessage(c, http.StatusForbidden, fmt.Sprintf("令牌分组 %s 已被禁用", tokenGroup))
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user