mirror of
https://github.com/truewhile/MeBox.git
synced 2026-10-10 15:26:38 +08:00
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:
@@ -213,10 +213,13 @@ func TestEmbyAuthenticatedRequestRefreshesRealtimeUserActivity(t *testing.T) {
|
||||
if w.Code != http.StatusOK {
|
||||
t.Fatalf("admin users status: %d body=%s", w.Code, w.Body.String())
|
||||
}
|
||||
var users []model.User
|
||||
if err := json.Unmarshal(w.Body.Bytes(), &users); err != nil {
|
||||
var payload struct {
|
||||
Users []model.User `json:"users"`
|
||||
}
|
||||
if err := json.Unmarshal(w.Body.Bytes(), &payload); err != nil {
|
||||
t.Fatalf("decode users: %v", err)
|
||||
}
|
||||
users := payload.Users
|
||||
if len(users) != 1 {
|
||||
t.Fatalf("users = %#v", users)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user