Commit Graph

13 Commits

Author SHA1 Message Date
Johnny 5cdb9ee399 fix(api): hide the instance admin from anonymous profile requests (#6491) 2026-10-22 08:26:33 +08:00
Johnny 1511fd125d refactor(server): replace Echo with net/http (#6475) 2026-10-15 09:32:02 +08:00
Johnny e0dbf5eeb1 feat(usage): store usage limits as an ordered list of entries (#6472) 2026-10-15 08:01:32 +08:00
Johnny 2487db7c77 fix(auth): surface PAT store failures instead of a silent 401 (#6461) 2026-10-13 06:52:58 +08:00
johnnyjoygh 6c6c5b79ad fix(auth): invalidate access tokens after password changes 2026-10-12 23:36:58 +08:00
johnnyjoygh 9e3a164dff feat(usage): add default limits and explicit rule targets
Move memo content size into usage limits, with 8 KiB content and 32 MiB
upload defaults when settings are absent. Represent stored rule targets
with all_users or a positive user_id, and use that same schema for
deployment configuration.

Rename the memo count metric, remove reserved proto declarations, and
renumber fields and enums for the unreleased schema. Synchronize
enforcement, settings UI, generated clients, and tests.
2026-10-12 22:35:39 +08:00
boojack 7cb288864b refactor: move the upload size limit to usage limits
The instance-wide maximum upload size in the storage setting and the
per-user UPLOAD_BYTES usage limit were two caps on the same thing, with
a
rule that the per-user value could only lower the instance value. The
storage setting field is removed, and the all-users UPLOAD_BYTES usage
limit is the only per-file cap. A user's own limit replaces the default
in either direction, and no limit means any file size.

- Remove upload_size_limit_mb from the API and store storage settings,
  the 32 MiB store default, and the deployment config check.
- Drop the FILE_TOO_LARGE error; every refusal is QUOTA_EXCEEDED with
  metric UPLOAD_BYTES.
- Split usagelimit.CheckFileSize out of CheckUpload and call it from
  memo import, so import is no longer a bypass.
- Remove the Maximum upload size field from the Storage section and the
  instance-limit warning from the usage limits dialog.

The old value is not carried over. Instances that relied on the default
accept any file size until an admin sets a limit.
2026-10-11 22:08:13 +08:00
boojack 1a5886d7c1 feat: add per-user usage limits (#6456) 2026-10-11 21:25:40 +08:00
Johnny d775160283 fix: harden instance admin, health, and mail header handling (#6454) 2026-10-11 10:52:03 +08:00
johnnyjoygh 92ff239988 fix(api): use opaque page token in ListAttachments
ListAttachments was the only list RPC whose page token was a bare decimal
offset. Switch it to the shared PageToken format used by every other
paginated handler so the token also carries the page size and stays
consistent across the API.
2026-10-11 09:06:07 +08:00
kediyalua 91d4a93ec8 fix(api): return attachment page token only when more results exist (#6452)
Signed-off-by: kediyalua <kediyalua@outlook.com>
2026-10-11 08:58:23 +08:00
johnnyjoygh a316e7935b chore(go): modernize source and enforce go fix in CI 2026-10-09 22:07:23 +08:00
ABird af38e75e2d refactor(api)!: drop the v1 version marker (#6447) 2026-10-08 21:49:37 +08:00