feat: make user limit configurable from admin user management (#18)

Store the per-instance user cap in settings (default 20) and expose
GET/PUT /admin/users/limit endpoints. The user management page now lets
admins view and update the limit without touching system settings.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: truewhile <truewhile@users.noreply.github.com>
This commit is contained in:
truewhile
2026-09-02 17:10:07 +08:00
committed by GitHub
parent da99182222
commit bbb512760a
11 changed files with 383 additions and 23 deletions
+2
View File
@@ -102,6 +102,8 @@ func registerAdminStrmRoutes(admin *gin.RouterGroup, svc *service.Container) {
}
func registerAdminUserRoutes(admin *gin.RouterGroup, svc *service.Container) {
admin.GET("/users/limit", getUserLimitHandler(svc))
admin.PUT("/users/limit", updateUserLimitHandler(svc))
admin.GET("/users", listUsersHandler(svc))
admin.POST("/users", createUserHandler(svc))
admin.PATCH("/users/:id", updateUserHandler(svc))