Audit(#66): InvitationAcceptanceService never grants TenantId — invited member lands in no_workspace #107
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#107
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
InvitationAcceptanceService.cs:120-126 adds the UserTenant row on accept but does not set
User.TenantId(contrast UserProvisioningService.cs:171-174 and RegisterVerify.cs:212 which grant it). The workspace gate (SsdidAuthMiddleware.cs:123) isTenantId is null.Trigger: existing user accepts POST /api/invitations/{id}/accept → 200 with tenant_id → every folders/files/shares call returns 403 no_workspace until they discover switch-tenant on their own.
Fix: after the atomic claim, ExecuteUpdateAsync set TenantId (where currently null), mirroring provisioning.
M1.5 close audit (#66).