Docs
API Reference
Permissions

Permissions

Permissions enable the toggling of Puck features. There are three types of permissions:

  1. Global permissions are shared across the entire Puck application. Controlled via the permissions prop on the <Puck> component.
  2. Component permissions allow feature control across for all instances of a given component type. Controlled by the permissions component config API.
  3. Dynamic permissions enable control after each data change, and are ideal for per-instance component permissions. Controlled by the resolvePermissions component config API.

APIs

Setting permissions

  1. Global permissions prop
  2. Component permissions parameter
  3. Component resolvePermissions parameter

Extending permissions

  1. getPermissions
  2. refreshPermissions

Supported permissions

ParamExampleTypeDefaultStatus
deletedelete: trueBooleantrue-
dragdrag: trueBooleantrue-
editedit: trueBooleantrue-
insertinsert: trueBooleantrue-
...custommyPerm: trueBooleanundefined-

delete

Enable duplication of components.

drag

Enable component dragging. Disabling this will lock the component in place, but other components can still be dragged around it.

duplicate

Enable duplication of components.

edit

Enable field editing. This is the same as setting readOnly to true for all fields.

insert

Enable insertion of new components. Disabling this will disable the component list items.

...custom

Custom permissions enable you to control your own functionality when building custom interfaces.