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
+5 -1
View File
@@ -220,6 +220,8 @@ definitions:
type: string
id:
type: integer
is_admin:
type: boolean
last_used_at:
type: string
masked_token:
@@ -861,6 +863,8 @@ definitions:
type: object
user.createTokenRequest:
properties:
is_admin:
type: boolean
name:
type: string
type: object
@@ -3185,7 +3189,7 @@ paths:
post:
consumes:
- application/json
description: 为当前用户新建一个 API 访问令牌,仅在此接口返回一次明文令牌值,请妥善保存。
description: 为当前用户新建一个 API 访问令牌,仅在此接口返回一次明文令牌值,请妥善保存。可通过 is_admin 字段赋予令牌管理员权限(仅管理员用户可设置)。
parameters:
- description: 令牌名称
in: body