HOC SiteDocumentation

Permissions

Object permissions

Permissions decide what the public, platform roles, and website user roles can do on an object type’s entries. Role checkboxes are RBAC (own vs others). Optional structured conditions on a grant further restrict matches (field compare or a time window such as younger than 30 minutes since created_at). Empty conditions keep the checkbox-only behavior. GET list and GET detail enforce the same helper as the admin UI. Public create and unconditioned public view_all apply only while the visitor is anonymous. After sign-in, access comes from the visitor's website user role (and any conditioned public rules that still match, such as guest-owned rows). Public create is never OR'd into a signed-in role. Create requires that role's mutate_own on the type. Read requires see_own or see_others. A role map that lists any type and omits another type denies the omitted type. An empty object_types map grants nothing; a role must list every type it may act on. Registration assigns a role: the user-type role field default, otherwise the role labeled user, otherwise the oldest role. assign_user_role only changes that role. see_own means created_by_website_user_id equals the signed-in website user id. Self-registration sets that column, so the linked profile is own. A session match is a separate list-visibility disjunct: every sessionOwned field equals the httpOnly session id. The server does not write that id; the row matches only when those fields already equal it. Prefer a site variable and a normal filter. Field reads on that disjunct use the role's see_own grants. Row-level own stays the creator column. A relation such as cart_owner is not an ownership identity.

Read the current permission matrix.

GET /api/v1/{locale}/{websiteId}/objects/{objectTypeId}/permissions

Replace permissions. Role slices typically require website superadmin.

PUT /api/v1/{locale}/{websiteId}/objects/{objectTypeId}/permissions
{
  "public": {},
  "platformRoles": [{ "id": "string", "objectType": {} }],
  "websiteUserRoles": [{ "id": "string", "objectType": {} }]
}

MCP: get_object_permissions, save_object_permissions.