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
- 200
- 400
- 401
- 403
- 404
Updated
X-Tenant-Id is missing, the body is malformed, or it names a permission that is not in the catalog
No session cookie, or it expired
The role lacks roles.write, or the caller is not a member of this casino
No such role