Skip to main content
Atomically replace all permissions directly assigned to a role. An empty permissions array removes every permission from the role. Permissions that don’t exist are created when the caller has permission to create them. Required permissions:
  • rbac.*.add_permission_to_role
  • rbac.*.remove_permission_from_role
Creating a missing permission also requires rbac.*.create_permission.

Usage

Flags

string
The generated role ID or unique role name whose directly assigned permissions will be replaced. Set exactly one of --role or --role-id.
string
Deprecated. Use --role instead. Accepts a generated role ID or unique role name.
string[]
required
The complete set of permission slugs to assign directly to the role. Separate multiple values with commas. Missing permissions are created when authorized. Pass an empty value to clear all direct permissions.

Global Flags

Examples

See Roles and permissions for RBAC concepts and examples.
Last modified on September 18, 2026