For the complete documentation index, see llms.txt. This page is also available as Markdown.

Create a role

Create a role and attach the policies it grants.

Where: Membership → Roles → Add New · /projects/<project>/membership/roles/new

Before you start

  • The policies you want to attach exist — system policies are always there; your own come from Create a policy.

  • You need the membership:create permission on roles.

Steps

  1. Press Add New. The screen Add New Custom Role opens.

    Add New Custom Role with empty Role name and Description and the Attached policies picker listing the system policies
    The empty form.
  2. Fill in the form and tick the policies. Search policies... filters the list; Managed only shows only your own policies.

    Field
    Required
    What it does
    Example

    Role name

    yes

    The name of the role. It cannot be changed later.

    content-editor

    Description

    no

    What the role is for.

    Writes and edits articles; reads orders.

    Attached policies

    no

    The policies the role grants (system or yours).

    content-editing, orders-read

    Role name content-editor, Description Writes and edits articles; reads orders., Managed only ticked, content-editing and orders-read ticked
    The filled form with two policies ticked.
  3. Optional: press Preview on a policy to see the document it grants.

    Preview of the content-editing policy: version, pid, name, description and one permission allowing database:Read and database:Update
    A policy preview.
  4. Press Save.

Result

Cloud goes back to Roles and the new role is in the list as Custom with 2 policies. Its id joins the project and the role, for example pr_5ArJCRo2mJ90H2Fp1oU6ta_nr_IzlTB0VGnUVN5PCM5Ah1H; this id is what travels when you give the role to a user.

Roles list with content-editor, Custom, 2 policies
The new role in the list.

Change or remove it later

Do it from code

The client setup is on the Membership page. API: Create Role

Last updated

Was this helpful?