feat: add 'agent' API key role (content CRUD + backup)
- ALLOWED_API_KEY_ROLES (+ apikey_cli ALLOWED_ROLES) gain 'agent'. - 'agent' added to require_auth on markdown/patch/path create/update/ delete/move and backup get/load. apikey mint, /backup/convert, logs, config, webhook and permission/template settings stay admin-only. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -24,7 +24,7 @@ from db import get_db
|
||||
from db.models.APIKey import APIKey
|
||||
|
||||
# Keep in sync with api.apikey.ALLOWED_API_KEY_ROLES
|
||||
ALLOWED_ROLES = {"admin", "creator", "user"}
|
||||
ALLOWED_ROLES = {"admin", "creator", "user", "agent"}
|
||||
KEY_TTL_DEFAULT_DAYS = 15
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user