Team switching session scoping limits with Jetstream Teams
0 reputation · 15 Oct 2025, 07:39 UTC
Design goal
The objective is to understand the documented behavior and limits of Jetstream's Team Management when switching the active team in a session, specifically for an integration test without production credentials.
Jetstream provides teams with a many-to-many user-team relationship via a pivot table for role assignment, team switching logic that updates session state to scope application data, and role-based capabilities. Team logic adds complexity to queries because models are expected to be scoped to the current team ID.
There is uncertainty about where responsibility for state consistency lies after a team switch, particularly with cached data, and what limits exist for scoping and permission enforcement across teams.
Is cache invalidation on team switch expected to be handled by Jetstream or by application code? What documented limits apply to scoping Eloquent queries to the current team ID? Does the team switching mechanism guarantee session consistency across concurrent requests?