Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1c70523

Browse files
committed
feat(all): make team member limits configurable per-team
Add per-team member limit configuration following the existing MCP limit pattern. Teams now have a member_limit column that defaults to the global setting value. Backend changes: - Rename global setting from team.member_limit to team.default_member_limit - Add member_limit column to teams table with migration - Update TeamService to use per-team limits in member checks - Add member_limit to admin API schemas and validation - Update admin team endpoints to return member_limit field Frontend changes: - Add member_limit field to Team types and Zod schemas - Update MembersList to use dynamic limits from team prop - Add member_limit input to admin TeamDetailLimits component - Hide member count and info bullets for default teams - Update i18n text to reflect configurable limits Default teams remain single-user only. Non-default teams default to 3 members.
1 parent 86a2512 commit 1c70523

File tree

17 files changed

+6244
-15
lines changed

17 files changed

+6244
-15
lines changed

services/backend/api-spec.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33929,6 +33929,10 @@
3392933929
"type": "integer",
3393033930
"description": "Total MCP server limit"
3393133931
},
33932+
"member_limit": {
33933+
"type": "integer",
33934+
"description": "Team member limit"
33935+
},
3393233936
"created_at": {
3393333937
"type": "string",
3393433938
"description": "ISO8601 timestamp"
@@ -33946,6 +33950,7 @@
3394633950
"is_default",
3394733951
"non_http_mcp_limit",
3394833952
"mcp_server_limit",
33953+
"member_limit",
3394933954
"created_at",
3395033955
"updated_at"
3395133956
]
@@ -34117,6 +34122,10 @@
3411734122
"type": "integer",
3411834123
"description": "Total MCP server limit"
3411934124
},
34125+
"member_limit": {
34126+
"type": "integer",
34127+
"description": "Team member limit"
34128+
},
3412034129
"created_at": {
3412134130
"type": "string",
3412234131
"description": "ISO8601 timestamp"
@@ -34134,6 +34143,7 @@
3413434143
"is_default",
3413534144
"non_http_mcp_limit",
3413634145
"mcp_server_limit",
34146+
"member_limit",
3413734147
"created_at",
3413834148
"updated_at"
3413934149
]
@@ -34288,6 +34298,11 @@
3428834298
"type": "integer",
3428934299
"minimum": 0,
3429034300
"description": "Maximum total number of MCP servers the team can install (all transport types)"
34301+
},
34302+
"member_limit": {
34303+
"type": "integer",
34304+
"minimum": 1,
34305+
"description": "Maximum number of members allowed in this team"
3429134306
}
3429234307
},
3429334308
"additionalProperties": false
@@ -34363,6 +34378,10 @@
3436334378
"type": "integer",
3436434379
"description": "Total MCP server limit"
3436534380
},
34381+
"member_limit": {
34382+
"type": "integer",
34383+
"description": "Team member limit"
34384+
},
3436634385
"created_at": {
3436734386
"type": "string",
3436834387
"description": "ISO8601 timestamp"
@@ -34380,6 +34399,7 @@
3438034399
"is_default",
3438134400
"non_http_mcp_limit",
3438234401
"mcp_server_limit",
34402+
"member_limit",
3438334403
"created_at",
3438434404
"updated_at"
3438534405
]

services/backend/api-spec.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24007,6 +24007,9 @@ paths:
2400724007
mcp_server_limit:
2400824008
type: integer
2400924009
description: Total MCP server limit
24010+
member_limit:
24011+
type: integer
24012+
description: Team member limit
2401024013
created_at:
2401124014
type: string
2401224015
description: ISO8601 timestamp
@@ -24021,6 +24024,7 @@ paths:
2402124024
- is_default
2402224025
- non_http_mcp_limit
2402324026
- mcp_server_limit
24027+
- member_limit
2402424028
- created_at
2402524029
- updated_at
2402624030
required:
@@ -24138,6 +24142,9 @@ paths:
2413824142
mcp_server_limit:
2413924143
type: integer
2414024144
description: Total MCP server limit
24145+
member_limit:
24146+
type: integer
24147+
description: Team member limit
2414124148
created_at:
2414224149
type: string
2414324150
description: ISO8601 timestamp
@@ -24152,6 +24159,7 @@ paths:
2415224159
- is_default
2415324160
- non_http_mcp_limit
2415424161
- mcp_server_limit
24162+
- member_limit
2415524163
- created_at
2415624164
- updated_at
2415724165
required:
@@ -24262,6 +24270,10 @@ paths:
2426224270
minimum: 0
2426324271
description: Maximum total number of MCP servers the team can install (all
2426424272
transport types)
24273+
member_limit:
24274+
type: integer
24275+
minimum: 1
24276+
description: Maximum number of members allowed in this team
2426524277
additionalProperties: false
2426624278
parameters:
2426724279
- schema:
@@ -24314,6 +24326,9 @@ paths:
2431424326
mcp_server_limit:
2431524327
type: integer
2431624328
description: Total MCP server limit
24329+
member_limit:
24330+
type: integer
24331+
description: Team member limit
2431724332
created_at:
2431824333
type: string
2431924334
description: ISO8601 timestamp
@@ -24328,6 +24343,7 @@ paths:
2432824343
- is_default
2432924344
- non_http_mcp_limit
2433024345
- mcp_server_limit
24346+
- member_limit
2433124347
- created_at
2433224348
- updated_at
2433324349
required:
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTER TABLE "teams" ADD COLUMN "member_limit" integer DEFAULT 3 NOT NULL;

0 commit comments

Comments
 (0)