feat(organization): maximumMembersPerTeam support (#2374)

* feat(organization): maximumMembersPerTeam support

Allow configuration of maximum number of members allowed in a team.

* chore: cleanup
This commit is contained in:
Maxwell
2025-06-15 08:14:16 +10:00
committed by GitHub
parent 475472c971
commit 015ba5632b
5 changed files with 192 additions and 1 deletions

View File

@@ -973,7 +973,14 @@ The teams feature supports several configuration options:
// Dynamic limit based on organization plan
const plan = await getPlan(organizationId)
return plan === 'pro' ? 20 : 5
}
},
maximumMembersPerTeam: 10 // Fixed number
// OR
maximumMembersPerTeam: async ({ teamId, session, organizationId }, request) => {
// Dynamic limit based on team plan
const plan = await getPlan(organizationId, teamId)
return plan === 'pro' ? 50 : 10
},
}
```