Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291456

JsonApiResource\Link should be able to capture access + cacheability

$
0
0

Problem/Motivation

When customizing links for JSON:API resource objects, it's very difficult (impossible in some cases) to associate cacheability of a link when the link should not be accessible for some users but accessible to others.

Proposed resolution

Add a new argument to Link::__construct() that accepts an object implementing AccessResultInterface and captures its cacheability if it is a cacheable dependency.

User interface changes

None.

API changes

A new optional constructor argument on Drupal\jsonapi\JsonApiResourceLink

Data model changes

None.

Release notes snippet

TBD


Viewing all articles
Browse latest Browse all 291456

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>