Allow restrictions based on content type or field name

Created on 16 January 2025, 3 days ago

Currently restrictions are available only as high up as layouts. Allow restrictions based on field name and content type as well.

✨ Feature request
Status

Active

Version

2.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States sethhill

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

Merge Requests

Comments & Activities

  • Issue created by @sethhill
  • πŸ‡ΊπŸ‡ΈUnited States sethhill

    This MR adds some additional contexts that can be evaluated against:
    field_name: the Paragraphs reference field
    entity_type: the entity type (node, taxonomy term, etc.)
    entity_bundle: the entity bundle (content type, etc.)

    It also modifies the application of restrictions such that all contexts are required to match in order for any restriction to apply. This allows setting granular or broad restrictions, depending on the combination.

    For example:

    field_rule:
      context:
        entity_type: node
        entity_bundle: me_test_ct
        field_name: field_me_test_content
        region: _root
      components:
        - me_test_container
    

    Will only match on the root level of the field_me_test_content field when it is on a node of type me_test_ct. All other instances of that field will not be restricted.

  • πŸ‡ΊπŸ‡ΈUnited States sethhill
Production build 0.71.5 2024