Problem/Motivation

It seems that the "Config Page entity" field formatter does not respect the permissions set to view config pages. This results in only admin user being able to see config pages rendered through the field formatter.

If a role has the permission to view the specific config page type or any config page type, the field formatter should display the config page to a user with this role.

Steps to reproduce

  • Add an entity reference field for "config page type" to a node (or other entity).
  • Configure display of node or other entity to use the "Config page entity" field formatter.
  • Create a node (or other entity) and select a config page in the entity reference field.
  • Set permission for anonymous users to view the config page type referenced.
  • View the node (or other entity) as an anonymous user.
  • Note that the config page will not be displayed.

Proposed resolution

Change code that checks access in the field formatter (problem is, that field formatter is checking access for 'config page type' entity, while it should check access for 'config page' entity instead).

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

stefan.korn created an issue. See original summary.

stefan.korn’s picture

Status: Active » Needs review
shumer’s picture

Assigned: Unassigned » shumer
miritas’s picture

Status: Needs review » Reviewed & tested by the community

Tested. It looks good to me. I can consider it ready for proceeding.

  • stefan.korn committed 3bb932a0 on 8.x-2.x
    Issue #3540146: Config Page entity field formatter does not respect...
shumer’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.