Commit graph

10 commits

Author SHA1 Message Date
boojack
4bc3928029 fix(user): implement ListUsers pagination
Rework ListUsers to match the ListMemos pagination contract: opaque
PageToken, normalizePageSize, DB-level limit+1 look-ahead, and a
next_page_token. Adds Offset to store.FindUser with an OFFSET clause in
all three dialects, and an `id DESC` ORDER BY tiebreaker so offset pages
stay stable when created_ts ties.

Also align pagination across list endpoints:
- Bump DefaultPageSize 10 -> 50 to match the documented default; use
  normalizePageSize in ListAttachments.
- Remove the never-implemented total_size field from all six list
  responses (ListUsers, ListAttachments, ListMemoComments,
  ListMemoReactions, ListUserSettings, ListPersonalAccessTokens) and
  regenerate.
- useListUsers now pages through next_page_token so the admin members
  view still loads every user past the default page size.
2026-07-12 20:51:04 +08:00
boojack
0fb83a745d
fix(auth): harden authorization and username validation (#5890) 2026-04-25 21:24:16 +08:00
boojack
c45663761d fix(api): reduce memory pressure in backend paths 2026-04-16 23:08:48 +08:00
Johnny
0f3c9a467d refactor: migrate HOST roles to ADMIN
- Updated the isSuperUser function to only check for ADMIN role.
- Added SQL migration scripts for MySQL, PostgreSQL, and SQLite to change user roles from HOST to ADMIN.
- Created a new SQLite migration to alter the user table structure and ensure data integrity during the migration process.
2026-01-20 23:38:30 +08:00
Johnny
bc7decf642 refactor: remove unused constants 2025-10-16 20:40:46 +08:00
Steven
91c2a4cef9 refactor: inbox service 2025-06-18 19:06:09 +08:00
johnnyjoy
2a861ea430 refactor: tweak resource state in api 2025-01-10 22:20:23 +08:00
johnnyjoy
3220adbff9 refactor: split memo service 2024-12-26 20:13:05 +08:00
Steven
1ccfa81cf3 chore: tweak common function 2024-05-26 11:02:23 +08:00
Steven
20dd3e17f7 chore: rename router package 2024-05-01 10:28:32 +08:00
Renamed from server/route/api/v1/common.go (Browse further)