-
-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
P3Nice to have — can waitNice to have — can waitphase:2-orgsPhase 2: Multi-tenancy & OrganizationsPhase 2: Multi-tenancy & Organizations
Description
Description
Endpoint to switch the user's current organization, issuing a new JWT and fresh abilities.
Details
POST /api/organizations/:organizationId/switch- Verifies user has a membership on target organization
- Issues a new JWT with updated organizationId
- Returns new abilities for the target organization
- Updates user.currentOrganization in DB
Security
- Must verify membership before switching
- Old JWT remains valid until expiration (acceptable, resolved properly in phase 6 with short-lived tokens)
Acceptance criteria
- Endpoint switches current organization
- New JWT issued with correct organizationId
- New abilities returned for target organization
- 403 if user is not a member of target organization
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P3Nice to have — can waitNice to have — can waitphase:2-orgsPhase 2: Multi-tenancy & OrganizationsPhase 2: Multi-tenancy & Organizations