Add entity type prefix to access policies

Created on 25 February 2024, 9 months ago

Problem/Motivation

When creating access policies for different entity types we need to manually set some kind of prefix when we have duplicate policy names. For example, if I create a “Department” policy for nodes and taxonomy terms, they need machine names like “department” and “term_department”.
This is even more relevant now that we’ve opened up support for even more entity types.

Proposed resolution

We should mirror what view modes and form modes are doing. They automatically add an entity type prefix to each display mode. For example, node.default and taxonomy_term.default.

Data model changes

This has implications for existing data. All existing access policies will need to be updated from “policy” to “entity_type.policy”. We will also need to update all the entities with access policies. Or at the very least have safe backwards compatibility.

Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇺🇸United States partdigital

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024