For the complete documentation index, see llms.txt. This page is also available as Markdown.

Permissions

Control which WordPress roles can read, create, update, or delete CCT records.

ACPT's CCT permission system lets you restrict access to custom tables and table groups on a per-role basis. Permissions are configured through the ACPT Permissions Manager and applied automatically to WordPress roles on admin_init.

Default behaviour

When no permissions are configured for a table or table group, all logged-in users can read, create, update, and delete records. Permissions are opt-in — you only need to configure them if you want to restrict access.

Table permissions

Each table supports four capabilities:

Capability
Description

read

View the records list and individual records.

create

Create new records.

update

Edit existing records.

delete

Delete records.

Table permissions screen
Granting the Editor role read/create access on the movies table.

Table Group permissions

Each table group supports two capabilities:

Capability
Description

read

View the group and its tables in context (e.g. on a post edit screen).

edit

Edit the table group settings.

Configuring permissions

  1. Navigate to ACPT → Custom Content Types → [table or group name] and click View.

  2. Click Permissions in the action buttons.

  3. For each WordPress role, toggle the capabilities on or off.

  4. Click Save.

Alternatively, navigate directly to ACPT → Permissions Manager → Custom Content Types.

How capabilities are applied

ACPT translates each capability into a WordPress role capability using the pattern:

Examples for a table named movies:

ACPT capability
WordPress capability

read

read_movies

create

create_movies

update

update_movies

delete

delete_movies

These capabilities are added to (or removed from) WordPress roles via $role->add_cap() / $role->remove_cap() on every admin_init.

Checking permissions in templates

See also

Last updated