Update role
hub_update_roleChange what a role allows, or rename it. This is the tool for "let cashiers give discounts" or "stop them seeing the reports" — it changes things for EVERY person on that role at once, so name them from get_roles when you confirm. PERMISSIONS ARE POWER. Confirm with the merchant first, naming the person and the role out loud ("give Maria the Manager role — yes?"), and never act on a role change you inferred rather than were asked for. The change is live on the next request: rights are re-read from the role every time, so no one logs out and no agent key stops working — including yours, if the change reaches your own account. Grant and revoke by permission id: grant ids from get_permissions, revoke ids from the role’s granted list in get_roles. Permissions you do not mention are left exactly as they are. You cannot edit the role you are signed in under — the cabinet locks it too, because it decides your own powers. Ask someone on another role. To move one person instead of changing the role, use assign_role.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | New name for the role | |
| roleId | Yes | Role id from get_roles | |
| grantPermissionIds | No | Permission ids to switch ON | |
| revokePermissionIds | No | Permission ids to switch OFF |