Pular para o conteúdo principal

Replace a role's permissions

PATCH 

/admin/roles/:id

Accepts permissions and nothing else, on purpose.

A membership stores the role's key, so renaming a key would silently de-authorize every membership holding it and no code path would notice. Not accepting the key is what makes that unrepresentable.

The list REPLACES the role's grants — it is not a delta. Every entry must be a key from GET /admin/permissions; one that is not is refused rather than stored, because a grant nothing ever checks is a permission that appears to work.

Permission: roles.write

Request

Responses

Updated