Audit(#66): InvitationAcceptanceService never grants TenantId — invited member lands in no_workspace #107

Closed
opened 2026-11-07 19:22:54 +01:00 by amiryahaya · 0 comments
Owner

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) is TenantId 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).

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) is `TenantId 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).
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
primatekuntech/failsulit#107
No description provided.