Skip to content

Custom roles

Custom roles tab of the Roles page The Custom roles tab of the Roles page, with the New role button.

Description

A role is a named set of permissions. In addition to the system roles of Myra, a tenant defines its own custom roles. For example, a custom role can manage agents and prompts but not billing.

The Custom roles view is the Custom roles tab of the Roles page in the People section of the Organisation area. Custom roles used to be a page of its own; it is now a tab of Roles, next to System roles (each tab shows a count). Open Organisation in the user-block menu, then People → Roles → Custom roles (route /org/<organisation>/people/roles?view=custom; the old address /custom-roles redirects there). The page is shown to users who hold the Manage roles within the tenant permission (ROLE_MANAGE); without it the page shows No access in place. By default, the admin and tenant_admin roles hold this permission. A custom role that includes the permission also shows the page.

Custom roles belong to one tenant. Every action on this view applies to the organisation in the address. The view has no organisation picker; a platform administrator opens an organisation first.

The table of the view has the columns Role, Type (badge Custom), Permissions (the number of permissions), Users (the number of active users who hold the role), and Actions. A tenant without custom roles sees the message No custom roles yet. Create one to grant a tailored set of permissions.

If the permission catalog cannot be loaded, the view shows The permission catalog could not be loaded, so creating and editing roles is unavailable. Please reload the page. The New role button and the edit action are then disabled.

The permission catalog

Permissions are grouped by module. The role page shows one tab per module, for example Agents, Analytics, Billing, Groups, Projects, Roles, Users, and Workflows. Each tab shows the number of selected permissions and the total number of permissions of the module, for example 2/5.

The following rules apply to the catalog:

  • You grant only permissions that you hold yourself. A permission that you do not hold is disabled on the role page.
  • A custom role never carries a platform permission (a permission that works across tenants).
  • The permission Manage tenant users alone does not allow a user to create users, mint tokens, disable users, or change roles. These actions also need a base role that assigns roles (Tenant Administrator or platform administrator). The role page shows this hint below the permission.

Creating a custom role

Before you begin, ensure the following conditions are met:

  • You hold the ROLE_MANAGE permission.

Proceed as follows to create a custom role:

  1. Open Organisation › People › Roles and select the Custom roles tab.
  2. Click on the New role button.
    • The New role page opens, /org/<organisation>/people/roles/new, with a sticky Save / Cancel action bar at the bottom.
  3. Enter a name in the Name text field. The name has a maximum of 80 characters. For example: Support agent
  4. If required, enter a text in the Description (optional) text field. The description has a maximum of 255 characters.
  5. Select a module tab under Permissions.
  6. Select the checkbox of every permission the role carries.
    • Repeat steps 5 and 6 for every required module.
  7. Click on the Create role button in the action bar. Cancel returns without saving; leaving the page with unsaved input asks for confirmation first.

-> The Custom roles tab opens again and lists the new role. Repeat this process for all required roles.

If the name is already used, the page shows A role with that name already exists. If a selected permission is refused, the page shows You cannot grant <KEY> — you do not hold it yourself.


Editing a custom role

A change of a custom role applies to every user who holds the role, on the next request of the user.

Proceed as follows to edit a custom role:

  1. Click on the Edit action in the row of the role.
    • The Edit <NAME> page opens, /org/<organisation>/people/roles/<role>/edit.
  2. If required, change the Name text field or the Description (optional) text field.
  3. If required, change the selected permissions under Permissions.
  4. Click on the Save changes button in the action bar at the bottom.

-> The Custom roles tab opens again and shows the changed role.

The following rules apply when you edit a custom role:

  • The name is saved first, then the permissions. If the permission change is refused, the page stays open with The name was saved, but the permissions were not: <REASON>. The new name is already saved.
  • If the role includes permissions that you do not hold, the page shows This role includes <COUNT> permission(s) you do not hold yourself. You can rename it, but changing its permissions requires an admin who holds them. The permissions are then read-only for you.

Deleting a custom role

⚠️ Caution: Deleting a custom role removes all of its assignments. Users who held the role lose its permissions immediately. The action cannot be undone.

Proceed as follows to delete a custom role:

  1. Click on the Delete action in the row of the role.
    • A confirmation dialog opens.
  2. If the role is assigned to active users, enter the name of the role in the confirmation dialog.
    • The confirmation dialog shows the number of active users who lose the role.
  3. Confirm the deletion.

-> The role is removed from the list of custom roles.

The delete is refused when a holder of the role is a user you cannot manage, for example a platform administrator. The view then shows The role was not deleted: it is assigned to <COUNT> users you cannot manage (deactivated accounts included). Ask an administrator who can. Deactivated accounts count, because they get the role back when they are restored.


Assigning a custom role

Custom roles are assigned to a user on the Members view, in the Custom roles section of the user. The effective permissions of a user are the union of the base role and every assigned custom role. You assign only a role whose permissions you hold, to a user who does not outrank you.

See also

  • Roles & permissions — the read-only reference of the system roles.
  • Members — assigning roles to users.
  • Groups — granting access at the group level.
  • Roles API — the endpoints, the full permission catalog, and the delegation, subset, and rank rules.