fix(files): tenant root = shared org workspace, member-writable via explicit flag (B-7, #38) #80
No reviewers
Labels
No labels
epic
phase-0
phase-1
phase-2
phase-3
phase-4
phase-5
phase-6
phase-7
phase-8
phase-9
priority/P0
priority/P1
priority/P2
type/backend
type/client
type/docs
type/ops
type/security
type/spike
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
primatekuntech/failsulit!80
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/b7-root-folder-membership"
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?
Closes #38 (B-7 baseline finding — multi-member tenants: everyone but the first member got 403 uploading to the org root)
The bug
GetRootFolderpicked the tenant root with no owner filter (first caller becameOwnerId), and both upload gates (CreateUploadUrl+ legacy multipartUploadFile) then requiredfolder.OwnerId == user.Idor a personal write-share — members of an org couldn't use their own workspace root. The Personal-tenant auto-creation half of the finding was already resolved by ACC-03 (task 1.1).The fix — explicit canonical-root flag
Folder.IsTenantRoot(migrationFolderIsTenantRoot): marks THE shared workspace root, managed byGetRootFolder(created with the flag; pre-flag tenants converge by promoting the earliest root-level folder so members keep the workspace they know)FolderAccessPolicy.IsTenantRootSharedAsync: canonical root + active tenant membership (UserTenantrow) ⇒ write — wired into both upload gatesParentFolderId == null— the existingSecureFileSharingE2eTests.ReadShareHolder_CannotUploadToSharedFolderE2E caught it (Alice's root-level folder became member-writable). That E2E now passes unchanged, guarding the corrected semanticsVerification
TDD: 3 tests first — RED ×2 (member root upload via upload-url + legacy multipart), subfolder control green throughout. One unrelated registry-E2E flake on first suite run, green on rerun.
Suite 872 / 0 failed / 39 skipped (Release + Debug) · coverage gate 84.99% ≥ 80