mirror of
https://github.com/LukeHagar/better-auth.git
synced 2025-12-09 20:27:44 +00:00
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:
@@ -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
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user