Roles and permissions

Access in Tienda has two layers: what a person is in a shop (a membership), and what a profile allows. The manual explains the screens: Roles and profiles.

Membership roles

A person belongs to a shop with one membership role:

Membership roleWhat it means
adminAdministrator of the shop. Never limited by profiles or permissions. Can use every endpoint of the shop, including the admin-only ones.
memberA staff member. Can do everything except the endpoints that are for administrators only.
viewerRead only. Cannot make any change.
driverReaches the driver endpoints only, and nothing else of the shop.

This role belongs to the person in that shop. It is separate from the platform role of an operator, which does not count inside a shop.

Profiles, roles and permissions

To limit a member or viewer further, give them a profile.

person -> profile -> role -> permission
  • A permission is a name like pos.orders#create: an area and resource, a #, and an action. The list is fixed by the product.
  • A role is a set of permissions. A profile is a set of roles. A person can have several profiles.
  • Give every staff member a profile. A member without a profile is limited only by their membership role; only people who have a profile are limited to the permissions of their profiles.
  • Administrators are never limited, with or without a profile.

A request is checked against the permission of its resource and action, such as pos.orders#update. Where no permission exists for that exact action, a read needs any read permission of the resource, and a write needs any write permission of it. A resource that has no permissions in the catalog is not governed and follows the membership role. When a profile limits a person and the permission is missing, the answer is 403 with reason: "missing_permission" and permission naming the missing one.

Some endpoints are for administrators only, whatever the profile: users, roles, profiles, API keys, shop settings, connections, payroll, tax settings, printing set-up and loyalty settings. Some are for every signed-in member: the person's own account, notifications and search. Shop customers and public shop reads are not checked, as they are not staff.

The AI connections under Settings > AI agents are an exception: every member sees and ends the connections they approved themselves, and a shop administrator sees and ends everyone's in that shop. Switching MCP on and making agent keys stay administrator only. See the MCP overview.

Default roles and profiles

The product ships with four roles. Each has a profile of the same name ("Administrator" for the Admin role).

RolePermissions
AdminAll.
ManagerAll except those under settings..
CashierThe point of sale permissions (pos.) except opening the history of all shifts, creating, changing, archiving or deleting cash drawers, and the two sensitive register permissions below. Plus product, category, stock and loyalty look-ups needed at the register. A cashier opens, closes and counts a drawer that exists; a manager or an administrator creates it.
ViewerEvery read permission (#index and #show), except the e-mail log.

Roles that already exist are not changed when a new release adds permissions. An operator runs the permission seed after a release; it only adds what is missing.

Sensitive permissions

For most permissions, "no profile" means "not limited". Two are different:

PermissionWhat it allows
pos.register#discountA discount on a line in a register sale.
pos.register#override_priceA price other than the catalogue price, or a surcharge.

For these, a person without a profile is not allowed. Only administrators and people whose profile grants the permission have them. Manager and Admin have both; Cashier has neither. See Register sales.

Register permissions

PermissionWhat it allows
pos.register#useSell at the register and park tickets.
pos.orders#createCreate orders. A register sale needs this and pos.register#use.

Parked tickets also refuse a person whose membership role is viewer, even without a profile.

The API for managing roles

Roles, profiles and permissions have their own endpoints under /api/v1/roles, /api/v1/profiles and /api/v1/permissions. They are for administrators. The back office uses them on Settings, Roles and Profiles.

GET /api/v1/auth/me answers the person's permission_names and a flag permissions_enforced. When nothing limits the person (an administrator, or a member or viewer without a profile) permission_names is ["*"] and the flag is false. Otherwise it lists the permissions of their profiles.