权限提升
API 返回此错误时,状态码为 403 Forbidden,其 type 为 https://lingo.dev/docs/api/errors/privilege-escalation。所有错误的通用结构请参阅错误和状态码。
角色不能授予你自己的角色尚未拥有的权限:org:manage_team。请先为自己申请这些权限,或将其从该角色中排除。
字段#
除了标准的 type、status、title 和 detail 成员,响应体还包含以下字段。detail 文本根据这些字段生成,因此客户端也可以显示自己的文本。
| 字段 | 类型 |
|---|---|
permissions | ("org:manage_team" | "org:manage_billing" | "org:manage_settings" | "org:manage_api_keys" | "org:manage_integrations" | "org:delete" | "org:view_audit_logs" | "engine:read" | "engine:translate" | "engine:create" | "engine:edit" | "engine:delete" | "engine:review_translations" | "org:manage_reviews" | "org:glossary:read" | "org:glossary:edit" | "org:brandvoice:read" | "org:brandvoice:edit" | "org:ruleset:read" | "org:ruleset:edit" | "org:suggestion:read" | "org:suggestion:edit")[] |
示例#
json
{
"detail": "A role cannot grant permissions your own role does not carry: org:manage_team. Ask for them yourself first, or leave them out of the role.",
"permissions": [
"org:manage_team"
],
"type": "https://lingo.dev/docs/api/errors/privilege-escalation",
"status": 403,
"title": "Privilege escalation"
}返回此错误的端点#
PATCH /v2/invites/{id}PATCH /v2/organizations/{orgId}/members/{userId}PATCH /v2/roles/{id}PATCH /v2/service-api-keys/{id}POST /v2/organizations/{orgId}/invitesPOST /v2/organizations/{orgId}/rolesPOST /v2/organizations/{orgId}/service-api-keysPOST /v2/organizations/{orgId}/service-api-keys/scim