Prevent inaccessible links from being displayed in LinkFormatter

Created on 3 September 2021, over 3 years ago
Updated 17 September 2024, 4 months ago

Problem/Motivation

At the moment it seems LinkFormatter doesn't prevent inaccessible links (e.g: links to unpublished nodes) from being displayed.

Steps to reproduce

- Create a link field in e.g: article nodes
- In "Manage display" use LinkFormatter or LinkSeparateFormatter
- Create an unpublished article node (U)
- Create a published article node (P) and link node U
- As anonymous, we see the link to node U which leads to a 403

Proposed resolution

Some sites may want to render those inaccessible links so I propose to add a setting (checkbox) in the formatter to run access checks.
If it is checked, and the user doesn't have access, the link won't be displayed.

✨ Feature request
Status

Needs work

Version

11.0 πŸ”₯

Component
LinkΒ  β†’

Last updated about 15 hours ago

Created by

πŸ‡§πŸ‡ͺBelgium herved

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024