Closed (fixed)
Project:
Drupal core
Version:
8.3.x-dev
Component:
entity system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Jan 2017 at 16:26 UTC
Updated:
21 Feb 2017 at 18:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
swentel commentedSo this might be an explicit drush issue as I'm not able to create a failing test for now.
Comment #3
swentel commentedOk, entirely my fault
Comment #4
swentel commentedActually I could finally reproduce this with core. The culprit is the entityQuery in node_user_predelete() which shouldn't do an access check. It just needs to get the nodes it wants to delete.
Quickly hacked a fail patch which mimics my 'anonymous' environment. Adding this check makes it all work for me nicely.
I'm guessing users who want to cancel where suddenly they don't have access anymore (e.g. auto unpublish at spam for instance) for some reason to a node will get this failure too.
Comment #5
swentel commentedComment #6
swentel commentedComment #7
berdirOuch of course, yet another entity query that shouldn't do access checks.
We really should go through non-test entity queries and evaluate if they should do access checking or not.
Comment #9
berdir#2066993: Use magic methods to sync container property to \Drupal::getContainer in functional tests
Comment #11
swentel commentedComment #12
berdirLooks good to me.
Comment #13
berdirChanged to 8.2.x as that is AFAIK still the target for bugfixes that aren't causing any changes.
Comment #14
swentel commentedChanged something small in the comment just before the call of node_access_rebuild() (to lazy for interdiff)
Comment #16
swentel commentedComment #17
swentel commentedso node_user_cancel has this.
I suspect we'll have the same problem here in case of cancelling, but maybe for a different issue ?
Comment #20
catchOpened #2850423: node_user_cancel() shouldn't do access checks.
Committed/pushed to 8.4.x and cherry-picked to 8.3.x. Thanks!