mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-17 15:42:24 +00:00
feat(admin): document-vault limit fields on the admin surfaces
The two vault knobs become editable where operators already work: the app-settings card gains the per-file upload cap (MB, 1-100, mirrors the hard server ceiling) and the default per-account storage quota (GB, commit-on-blur with clamped conversion to bytes); the user edit form gains the per-user quota override (GB, empty = instance default). The admin users list now carries the override so the form can show it. Refs: document-vault plan W3-T7
This commit is contained in:
1 parent
0ade02e163
commit
0d37061d43
11 files changed
+229
-7
No files matched your search
@@ -17,6 +17,7 @@ export const GET = apiHandler(async () => {
|
||||
role: true,
|
||||
createdAt: true,
|
||||
mfaEnforced: true,
|
||||
documentQuotaBytes: true,
|
||||
_count: { select: { passkeys: true } },
|
||||
},
|
||||
orderBy: { createdAt: "asc" },
|
||||
@@ -32,6 +33,11 @@ export const GET = apiHandler(async () => {
|
||||
// v1.23 — per-user "require a second factor" override. The effective
|
||||
// requirement is the OR of this and the instance-wide policy.
|
||||
mfaEnforced: u.mfaEnforced,
|
||||
// Document vault — per-user storage-quota override. Null = the
|
||||
// instance default applies. BigInt in Prisma, number on the wire
|
||||
// (max override 1 TiB, comfortably inside Number's safe range).
|
||||
documentQuotaBytes:
|
||||
u.documentQuotaBytes === null ? null : Number(u.documentQuotaBytes),
|
||||
passkeyCount: u._count.passkeys,
|
||||
})),
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user