AccessToken 默认非管理员权限

This commit is contained in:
ryan
2026-06-10 22:36:17 +08:00
parent bff9e8811d
commit 983228227e
15 changed files with 107 additions and 21 deletions
+7 -1
View File
@@ -3634,7 +3634,7 @@
"SessionCookie": []
}
],
"description": "为当前用户新建一个 API 访问令牌,仅在此接口返回一次明文令牌值,请妥善保存。",
"description": "为当前用户新建一个 API 访问令牌,仅在此接口返回一次明文令牌值,请妥善保存。可通过 is_admin 字段赋予令牌管理员权限(仅管理员用户可设置)。",
"consumes": [
"application/json"
],
@@ -4549,6 +4549,9 @@
"id": {
"type": "integer"
},
"is_admin": {
"type": "boolean"
},
"last_used_at": {
"type": "string"
},
@@ -5489,6 +5492,9 @@
"user.createTokenRequest": {
"type": "object",
"properties": {
"is_admin": {
"type": "boolean"
},
"name": {
"type": "string"
}