feat: 批量设置用户最大连接数

前端:
- 用户列表添加 checkbox 多选(表格和网格视图)
- 选中用户后显示「批量设置连接数」按钮
- 批量设置对话框,输入连接数后批量应用

后端:
- 新增 BatchUpdateUserMaxConn repo 方法
- 新增 /api/v1/user/batch-set-max-conn API
- 返回成功/失败计数
- 加入 admin-only 路由白名单
This commit is contained in:
sagitchu
2026-04-25 22:03:42 +08:00
parent 3f374df724
commit 28568244bb
6 changed files with 175 additions and 1 deletions
+1 -1
View File
@@ -137,7 +137,7 @@ func requiresAdmin(path string) bool {
}
switch path {
case "/api/v1/user/create", "/api/v1/user/list", "/api/v1/user/update", "/api/v1/user/delete", "/api/v1/user/reset":
case "/api/v1/user/create", "/api/v1/user/list", "/api/v1/user/update", "/api/v1/user/delete", "/api/v1/user/reset", "/api/v1/user/batch-set-max-conn":
return true
case "/api/v1/config/update", "/api/v1/config/update-single":
return true