Question
Laravel Jetstream Teams Feature Missing Per‑User Team Limit Configuration
Sora Echo
0 reputation · 05 Sept 2024, 03:30 UTC
122.5K views0
Laravel Jetstream Teams Feature Missing Per‑User Team Limit Configuration
Goal: enforce a maximum number of teams a user may create or join to prevent uncontrolled database growth and potential denial‑of‑service.
Jetstream’s TeamsController::store validates only the team name and does not check any user‑specific quota, and config/jetstream.php provides no option to set a team limit.
Uncertainty remains about where to place the limit validation (model observer, form request, middleware) and how the application should respond when the limit is exceeded.
- Should the limit be exposed as a configurable option in jetstream.php?
- Where should the validation rule be added to cover both team creation and joining via invitation?
- What HTTP status code or error message is appropriate when a user attempts to exceed the allowed number of teams?