This is a followup of #2824640: Views cached results are not taking full cacheability metadata into account.
When performing access checks we are returning a boolean value to indicate the result of the check. We have inherited this approach from the Drupal 7 version of the module, but in Drupal 8 the result of an access check should be contained in an AccessResult
object.
The problem with the Drupal 7 approach is that we only communicate the result of the check: access is either granted or denied. In doing so we are losing all the cacheability metadata of the entities that are involved in determining the access. In effect we are losing all information regarding the cache tags, contexts and max age of the objects that determine access.
Comment | File | Size | Author |
---|---|---|---|
#7 | 3058300-7.patch | 7.61 KB | drunken monkey |
|
Comments
Comment #2
pfrenssenComment #3
borisson_/s/1.13/1.14/
Comment #4
borisson_Should we do this patch before #2824640 to make it simpler or can we do this later?
Comment #5
pfrenssenNo this is now completely decoupled from #2824640: Views cached results are not taking full cacheability metadata into account and can be worked on independently.
Comment #6
borisson_Good to know, the deprecation message should mention the correct version, otherwise +1.
Comment #7
drunken monkeyThanks a lot for splitting this off and reposting it here!
I just updated the deprecation version and fixed a few other nit-picks. Please test/review, then I guess we can already commit. (Though it’s a bit weird that we’re now completely ignoring this newly available information. But yeah, taking care of that in the other issue, of course.)
Comment #8
borisson_Looks solid. Thanks for fixing the nits :)
Comment #10
drunken monkeyGreat to hear, thanks for reviewing!
Committed.
Thanks again, everyone!