Add option to show permission summary in the field instance entity form description

Created on 26 April 2023, almost 2 years ago
Updated 9 May 2023, almost 2 years ago

Problem/Motivation

Sometimes you want to let the (entity) authors know about the consequences of selecting references in a reference field. For example they (mostly) should now that if they reference a user or a node, access will be inherited, ...

So it would make sense to have a boolean option to show a summary of the configured access permissions on the reference field in the field description.

I guess this option should be enabled by default.

This is NOT the same as Show information message on the Edit field form that permissions are / can be configured in Field settings Fixed , which is for the field edit form, while this issue is about the entity Create / Edit form (e.g. on nodes).

Steps to reproduce

Create a node with a reference field, which has Entity Access by Reference Field configured. As a node creator you don't know about this. While the site builder should not need to write the field summary for this by hand. On the other side the boolean option for the summary could be disabled, if he instead wants to write it by hand or doesn't want to expose that information.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Postponed

Version

1.0

Component

Code

Created by

🇩🇪Germany Anybody Porta Westfalica

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

Comments & Activities

  • Issue created by @Anybody
  • First commit to issue fork.
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.0.7 + Environment: PHP 8.2 & MySQL 8
    last update almost 2 years ago
    18 pass
  • @grevil opened merge request.
  • Status changed to Needs work almost 2 years ago
  • 🇩🇪Germany Grevil

    This is quite a bit of work, for such a minor feature. I implemented the base for future implementations.

    The workflow is the following:

    • Hook into the entity_reference widget
    • Inject our twig file with the summary into the container of the widget

    The current implementation is already pretty far. Only the twig file needs to get defined and the summary render array needs to get created, the rest is already done.

    Nonetheless, we will postpone this issue for now, when we have more time.

  • 🇩🇪Germany Grevil

    The remaining steps are marked with a "@todo" inside code.

  • Status changed to Postponed almost 2 years ago
  • 🇩🇪Germany Anybody Porta Westfalica

    Thanks @Grevil, the code is a good starting point to finish this someday. Anyway it's by far not important enough to invest more time here. So let's postpone this for now and the far future. Lots of more important tasks to solve.

    If anyone is willing to finish this, we'd be super happy to review :)

  • Issue was unassigned.
Production build 0.71.5 2024