Permissions

Entity-scoped, group-based access control — PermissibleEntity, PermissionEvaluator, GroupEvaluator, visibility flags, and the full decision matrix.

PermissibleEntity

kotlin

PermissionAction

ActionPurpose
VIEWSee the entity exists and read its fields
LISTEntity appears in list/search results
EDITModify the entity
MANAGEGrant/revoke permissions (implies EDIT)
DELETESoft-delete the entity
EXECUTETrigger workflow transitions
IMPERSONATEAct as another principal in this context

The Decision Chain

When isAllowed(authentication, entity, action) is called:

  1. Deleted check — if entity.isDeleted, only SA gets access.
  2. Public access — if public and published/advertised, VIEW is granted. If publicList and published/advertised, LIST is granted.
  3. Editor group — editor group members get EDIT access globally.
  4. Entity-level permissions — checks user's groups against EntityPermission records. MANAGE also satisfies EDIT.
  5. Role-based fallback — SA and admin get all actions. Editors get everything except MANAGE, EXECUTE, IMPERSONATE.

Published vs. Advertised

Advertised is a "soft-public" state — the entity can be found and viewed, but its binary content and supplementary attachments remain restricted.

WhatRequired FlagRequired State
Entity record (title, description)public = truepublished or advertised
Entity in list/search resultspublicList = truepublished or advertised
Binary content (file download)publicContent = truepublished only
Supplementary attachmentspublicSupplementary = truepublished only

In Queries: Filter, Don't Throw

Query fields silently filter unauthorized data to avoid leaking information:

kotlin
AuthenticationContext? is nullable in queries — unauthenticated requests are allowed but get filtered results.

In Mutations: Verify and Throw

kotlin

Creating New Entities

When creating, check permissions on the parent or require a group:

kotlin

GroupEvaluator

For operations that don't target a specific entity:

kotlin

Locked Entities

Some entities have a locked flag. Only the SA group can modify locked entities:

kotlin