You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(spaces): Shared Spaces — collaborative folders with owner-pays storage
A new distinct space type: an area owned by one user and shared with a
group as EDITOR (read/write) or VIEWER (read-only). Reuses the existing
server-side AES-256-GCM pipeline unchanged — no new cryptography. The
only new thing is a centralized authorization gate (getSpaceAccess) that
replaces the personal Drive's `ownerId === me` filter for shared content.
- Schema: SharedSpace + SharedSpaceMember (+ SpaceRole enum); Folder and
FileObject gain a nullable spaceId. Space content carries the owner's
ownerId (so the owner's quota is charged) and is reachable only through
the /spaces routes.
- Owner-pays: every file in a space is billed to the space owner via the
existing quota accounting.
- Lifecycle: deleting a space either hard-deletes its content (freeing the
owner's quota) or transfers ownership — and the storage cost — to the
earliest-joined member.
- Isolation: personal Drive, search, REST API, WebDAV, shares, trash and
account export all filter spaceId = null, so shared content never leaks
into a personal listing.
- Web: "Espaces Partagés" nav + /spaces list and /spaces/[id] browser
(folders, upload with progress, download, rename, delete, members and
lifecycle management). FR/EN i18n at parity.
- Tests: integration coverage for owner-pays, role enforcement,
non-member denial, isolation, transfer and delete-cascade.
Also fixes a stale assertion in the quick-code duplicate test (the route
deliberately returns a generic 403, not 409).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WNvAeoRFGJkRnaBGwMstZ9
0 commit comments