Skip to Content
DaaS StudioRoles & Policies

Roles & Policies

Access control in BuildPad DaaS is split across three layers: roles, policies, and permissions.

Roles

A role is a named group (e.g., Editor, Viewer). Users can hold multiple roles simultaneously. Navigate to /roles to create and manage roles.

Roles list page with the Administrator, Contributor, Editor and User roles

Each role detail page has three tabs:

  • Basic Information — name, icon, parent role
  • Users — users currently assigned to this role
  • Policies — attach/detach policies (M2M)

Role detail page, Basic Information tab

Policies

A policy is the source of truth for access flags. Navigate to /policies to manage policies.

Policy detail page with the access flags and the permissions table

Each policy can have:

  • Admin access — bypasses all permission checks globally
  • App access — grants access to the DaaS Studio
  • Delegate access — allows a static-token service account to pass the X-On-Behalf-Of: <user-uuid> header; the service account’s own policies still govern what actions are permitted, but the audit log records the delegated user as the actor (server-to-server only — ignored for cookie/session requests)

Policies are attached to roles (and optionally directly to users). A user’s effective permissions are the union of all policies from all their roles.

Permissions

Each permission rule controls one action on one collection for one policy:

  • Actions: create, read, update, delete, share
  • Fields: which columns are accessible
  • Item filter: JSON filter rule limiting which rows are accessible
  • Validation: rules constraining written values
  • Presets: default values injected at create time

Permission rules are configured in the permissions table on the policy detail page, under the Record-Level Access tab (module capabilities live in the adjacent Module-Level Access tab). Click an action badge in a collection row and choose Use Custom to open the rule editor for that action, with Item Permissions and Field Permissions tabs.

Custom permission editor for read on posts, with the item rule status equals published

Permissions are evaluated as the union of all policies assigned to a user — both directly and through all their roles. Admin access on any single policy bypasses all checks for that user.

Every collection (*)

A permission rule on the collection * applies to every collection you create, including collections created later. It never applies to a system collection (a collection whose name starts with daas_), such as users, roles, policies, files or settings. Give those their own rules.

A * rule and a rule on one collection add up: a user who has both gets what either one allows. A rule on one collection cannot narrow a * rule.

Roles from BuildPad

Since v0.3.0 every deployment has two more built-in roles, each with its own policy:

RoleIDCan do
Project Developer00000000-0000-0000-0000-000000000003Create, read, update and delete items in every collection (*), and files and folders. Read the data model. Read their own user record.
Project Viewer00000000-0000-0000-0000-000000000004Read items in every collection, files and folders, and the data model. Read their own user record.

Neither role has admin access. Neither can change the data model, users, roles, policies or settings.

These roles are for the BuildPad platform’s SSO auto-login. When the platform signs people in as themselves, a project Admin gets Administrator, a Developer gets Project Developer, and a Viewer gets Project Viewer. The platform creates each person’s account the first time they open the Studio, and changes only which of these three roles the account holds. It never changes what a role allows.

Until the BuildPad platform turns this on for your project, SSO auto-login still signs in as the project administrator, as before. Updating to v0.3.0 changes nothing for people who sign in today.

You can change what either role allows, for example to hide a collection from Viewers. An update does not undo your change. If a role of your own already uses one of the two IDs, the update does not create these roles; rename or move your role first.

Module-Level Access

Collection permissions control data — which rows and columns someone can touch. Module-level access controls features — whether someone can use a part of the app at all.

A feature permission is called a key. Keys have names like system:logs. You manage the list of keys on the Module Access Keys page (under Access in the sidebar), where they are arranged in a tree. You then grant keys to a policy on its Module-Level Access tab.

Module Access Keys page with the System and Workflow key groups

Module-Level Access tab of a policy, with one switch per key

A user gets every key that any one of their policies grants.

Keys that come built in:

  • system:logs — lets a non-admin open the Logs page
  • workflow:approve / workflow:reject — used by workflow transitions (a command can list module_access_keys, and the user needs either one of those keys or one of the command’s policies)

Checking keys in code

GET /api/permissions/me returns a user’s keys as a moduleAccess record, and React components can check one with usePermissions().hasModuleAccess(key).

Be aware that this browser-side check only decides what a user sees. It cannot stop a request, so a key that protects something real must also be checked on the server. This matters because keys have no database-level safety net the way collection permissions do — if the server check is missing, nothing else catches it.

See Module Access for how to read keys over the API and check them in your own server code.

Built-in Access Check

GET /api/access — list all access records GET /api/policies/me — effective policies for current user GET /api/roles/me — roles for current user GET /api/permissions/me — effective permissions for current user