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
@@ -3641,7 +3641,7 @@ const docTemplate = `{
"SessionCookie": []
}
],
"description": "为当前用户新建一个 API 访问令牌,仅在此接口返回一次明文令牌值,请妥善保存。",
"description": "为当前用户新建一个 API 访问令牌,仅在此接口返回一次明文令牌值,请妥善保存。可通过 is_admin 字段赋予令牌管理员权限(仅管理员用户可设置)。",
"consumes": [
"application/json"
],
@@ -4556,6 +4556,9 @@ const docTemplate = `{
"id": {
"type": "integer"
},
"is_admin": {
"type": "boolean"
},
"last_used_at": {
"type": "string"
},
@@ -5496,6 +5499,9 @@ const docTemplate = `{
"user.createTokenRequest": {
"type": "object",
"properties": {
"is_admin": {
"type": "boolean"
},
"name": {
"type": "string"
}