権限昇格
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