Skip to content

Roles & Permissions

Control what members can do from Organization → Roles in the sidebar. You need org_roles:read to see the page and org_roles:write to create, edit or delete roles. There is no separate delete permission for roles.

The model

Access in Dory is role-based (see Identity & Access):

  • A permission is a single resource:action capability, e.g. sensors:read, lenses:write, subscriptions:write.
  • A role bundles permissions.
  • Each member holds one or more roles, and their effective permissions are the union of all of them. Permissions only add up, so it does no harm if two roles overlap.

Built-in and custom roles

Built-in roles come with the platform and are read-only: nobody can edit or delete them. To see exactly what one grants, open it. Custom roles belong to your organization, and you can shape them to fit how your team works.

Anyone who can edit roles can grant any permission your organization offers, including to themselves. Give out org_roles:write with care.

The roles list

The list shows each role's Name, Slug, Description, the number of Permissions it grants, and its Type (Built-in or Custom). It opens sorted by name, A–Z. Name is the only column you can sort by. The role count appears in the table header, and roles appear 50 at a time as you scroll.

To open a role, click its row or the Open button at the end of the row.

A role's dialog

Each role has one dialog. It shows the role and, when you're allowed, lets you edit it:

  • A built-in role, or any role if you don't have org_roles:write, opens read-only. You see its name, description, slug, and a permission grid that marks what it grants. The only button is Close.
  • A custom role, if you have org_roles:write, opens with editable fields. Save changes stays disabled until you change something. If you close the dialog with unsaved changes, it asks before discarding them.
  • Delete role is inside the dialog, below the permissions, and only on custom roles. Deleting asks you to confirm: members who hold the role lose the permissions it grants, and it can't be undone.

Creating or editing a role

  1. Go to Organization → Roles.
  2. Choose Create role, or open an existing custom role.
  3. Enter a Name (required) and, optionally, a Description and a Slug. A slug uses lowercase letters, numbers, hyphens and underscores, starts with a letter, and is at most 50 characters. If you type capitals, the dialog shows the lowercase version that will be saved.
  4. Choose permissions in the grid. It has one row per resource and one column per action. Tick single cells, or use the checkbox next to a resource's name to select or clear all of that resource's permissions.
  5. Choose Create role or Save changes. The change applies to every member who holds the role.

If the name or slug is already taken, the dialog says so under that field.

Assigning roles to members

You assign roles from the Organization page, not from Roles. Use a member's Manage roles action (see Organizations & Members). Assigning roles counts as managing members, so it needs org_members:write rather than org_roles:write. Tick and untick roles, then choose Save changes. The dialog asks you to confirm before removing a role. You can also manage the roles of an invited member who hasn't signed in yet: those are the roles they'll have when they do.

Dory checks permissions on every request, so a change applies to the member's next action. Their portal menus update the next time the portal loads their profile, for example when they reload the page or return to its tab.

Keep someone able to manage members

If removing a role from a member would leave nobody in the organization able to manage members and roles, Dory refuses. Editing a role's permissions and deleting a role are not checked this way, so make sure another role still grants org_members:write before you take it out of one.

Subscription permissions

Subscriptions are created by your applications, using an app client with its own scopes. A member's roles don't create subscriptions, and nothing in the portal creates one. A role can grant three subscription permissions, and each one controls what a member can do in the portal:

Permission What it lets a member do
subscriptions:read See an app client's subscriptions in its details dialog on the App Clients page, with each one's status and, for a subscription in error, the reason.
subscriptions:delete Delete any of the organization's subscriptions from that dialog, whichever app client created it.
subscriptions:write Open the Request Builder, which writes a subscribe snippet for your application to run.

A member's permission covers all of the organization's subscriptions. An app client's scopes reach only the subscriptions that client created. Identity & Access explains how the two differ.

The Request Builder's list of your organization's lenses needs lenses:read as well. Without it you can still type a lens alias. The built-in Application Builder role grants subscriptions:write but not lenses:read.

Least privilege

Grant the narrowest role that lets a member do their job. Someone who builds applications usually needs to manage app clients and their subscriptions, and to use the Request Builder. Managing sensors, members or roles can stay with admins.