Per-user quotas: storage.quota.perUserBytes (deferred from v0.2.5) #41
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/per-user-quota"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The per-user half of quota enforcement, deferred in v0.2.5 "until the per-user home model exists" — it exists since v0.2.6, so:
storage.quota.perUserBytes(+CAIRN_QUOTA_PER_USER_BYTES): caps each/home/<user>/tree. The quota decorator sits below the scope overlay, so it sees actual backend paths and needs no user context — the path prefix is the account.maxFileBytes, per-user remainder), enforced mid-stream via the existinglimitedReader→ErrQuotaExceeded→ 507/JSON as before. Exhausted quota rejects before any bytes flow./home/<user>/(group spaces, flat mode, admin root writes) are not subject to the per-user cap — global caps still apply.Tests (in-memory tree backend): cap enforced across cached credit, exhausted quota, per-user isolation, outside-home exemption, fresh-user zero usage, per-user remainder tighter than maxFileBytes.