mirror of
https://github.com/hansjone/netx.git
synced 2026-10-09 03:10:46 +08:00
Add filter-based topology bulk writes and refine API key scopes UX.
Filter add/layout/remove keeps MCP payloads small; tokens default MCP scopes and edit them in a modal with a compact help tip. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
bf0dfd66d8
commit
2d92dde8e5
18 changed files with 1294 additions and 257 deletions
|
|
@ -35,5 +35,11 @@ class ApiTokenCreateRequest(BaseModel):
|
|||
expires_in_days: int | None = Field(default=90, ge=0, le=3650)
|
||||
# Admin may create a token for another user; others ignored / forced to self.
|
||||
user_id: str | None = None
|
||||
# Capability subset; empty inherits owner scopes.
|
||||
# Explicit capability list; empty inherits owner scopes (legacy). Prefer non-empty.
|
||||
scopes: list[str] | None = None
|
||||
|
||||
|
||||
class ApiTokenUpdateRequest(BaseModel):
|
||||
name: str | None = Field(default=None, max_length=128)
|
||||
# Replace token scopes (capped to owner). Empty list clears to inherit owner scopes.
|
||||
scopes: list[str] | None = None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue