Tutorial

Part of a tutorial: Step 6 of 11 in Launch Laramin for your business · also in 1 other tutorial

Open in tutorial
In this section · 3 articles

Create a role and assign permissions

Create a new role, then choose what it can see and do, resource by resource, and review every change before you save.

Applies to
Roles & Permissions 1.3 and later
Who can do this
Platform owner, Administrator
Permission
feature.rbac.role.create
Where
Roles and Permissions › Roles (Platform Administration)
On this page

Before you start

  • You need Create Role (feature.rbac.role.create) to create the role and Edit Role (feature.rbac.role.edit) to choose its permissions, both held globally. Out of the box, only super admins have them.
  • Check the existing roles first. If one is close, you can copy its permissions into the new role.
  • You can only grant permissions you hold globally yourself. Super admins can grant any.

Create the role

  1. In the menu, open Roles and Permissions › Roles.

  2. Select New Roles.

  3. Enter a Label. This is the name people see everywhere, for example "Sales Manager".

  4. Enter a Name. This is the role's system name, used by Laramin's code, for example sales.manager. It must be unique. After you save, only a super admin can change it.

    You can't use the names that belong to Core: super.admin, administrator, admin and dev.admin.

  5. If you're a super admin, you can also choose the Module the role belongs to. This only labels the role in the list.

    The Create Roles form with Label set to "Sales Manager", Name set to sales.manager and the Module dropdown still unselected, ready to save.
  6. Select Save.

The role now appears in the list with 0 under Permissions. A new role can do nothing until you give it permissions.

Choose its permissions

  1. On the role's row, select Manage permissions.

    The role editor for Administrator, showing the permissions summary, the search and filter toolbar, and Core module resources with their Level menu, the List to Remove cells and Other actions.
  2. Each row is a Resource, such as User or Support ticket, grouped by module. For each row, set the access you want in one of two ways:

    • Open the Level menu and choose None, View (List and View), Edit (View, Create and Edit), Manage (Edit, Delete and Restore) or Full (every action, including Remove and the other actions).
    • Or set single actions in the List, View, Create, Edit, Delete, Restore and Remove columns. Each cell cycles Not granted, Own records only and All records. Own records only is offered where the resource has it.
  3. For actions that aren't in the standard columns, such as Reply or Close on Support ticket, open the cell under Other actions.

  4. To change many rows at once, open a column's menu to grant or revoke that action on every resource shown, or use Set level for all on a module.

    When one action needs another, Laramin adds or removes that one too and says so under the row. For example, granting Edit also grants View.

  5. Use the search box (Search resources, actions or keys) and the filters, such as Granted, Risky granted and Changed, to find rows. Show technical keys shows each permission's key, such as feature.core.user.edit.

  6. When you're done, select Review and save in the bar at the bottom. The bar counts your changes and says how many users the role affects.

  7. In Review … changes to …, check each line. Risky changes are listed first: actions that remove data, change access or act as someone else.

    The Review 2 changes to Administrator dialog, with Risky changes listed first (Remove on Core › Consumer), then the Granted line for Deletion request, and the Save 2 changes button.
  8. Select Save … changes.

You see Permissions of … saved, with a link to View in History.

Tip: To start from another role's permissions, select Copy from role…, choose the role and select Copy into editor. Nothing is saved until you review and save.

Careful: New roles get nothing automatically. If people with this role should open the Help Center, include Open the Help Center (feature.core.help.view). If they should enter an experience, such as Administration, give its door permission on the Users form instead. See Create a user.

What happens next

Give the role to people. See Give someone a role. You can also choose it in the Roles field when you create a user. Changes reach each person at their next click.