Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
node system
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Dec 2014 at 13:45 UTC
Updated:
22 Jan 2015 at 11:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
willzyx commentedPatch attached
Comment #2
aspilicious commentedI wanted to RTBC this but realised we don't have any tests for this...
Comment #3
willzyx commentedTest case attached
Comment #4
berdirNice find, we also need a combined patch with the fix and the tests now.
Test looks correct, just a bunch of nitpicks...
Should be contains, with a leading \: \Drupal\node\...
Should only have one empty line.
Missing space before {
setUp() needs an @inheritdoc and the modules needs the usual Modules to enable @var array.
Isn't node already enabled by default in NodeTestBase?
No need to assign the user, you don't need it anymore later.
Comment #5
willzyx commented@Berdir
Coding standards issues were resolved. Thanks for reviewing
Combined patch with the fix and the tests is attached
Comment #8
dawehnerWow!
Certainly optional nitpick: You could use "Contains \Drupal\node ..."
What about adding a quick check that the rebuild was actually successfull? You could for example try the 'node.grant_storage' service ... to fetch entries.
Comment #10
dawehner.
Comment #11
willzyx commented@dawehner
1) There are ~35 test cases that use "Definition of Drupal\node\.." ( without a leading \ ) in the node module.. what is the way to follow?
2) I'm not sure what you mean.. Aren't we verifing that node access rebuild functions work correctly even when other modules implements hook_node_grants()? isn't better to delegate to a separate test case the check that rebuild (according to the assignment of the grants defined in node_test_access) was actually successfull?
Comment #12
pcambraNew patch taking into account #8, added a few tests using the grant storage service
Comment #13
dawehnerContains is kind of the standard since 2 years, but we just had a hard time updating the old one :)
nice tests!
Comment #14
amateescu commentedI found two small nitpicks, sorry :/
Any reason to not use camel case here? :)
These two need the member visibility (public).
Comment #15
alexpottFor #14
Comment #16
alexpottFixing the title to be a bit more specific.
Comment #17
alexpottThis actually must be a critical because if this does not work then there are possible security implications.
Comment #18
pcambraThanks for the review @amateescu, here's a new patch fixing #14
Comment #19
dawehnerFeedback got addressed
Comment #20
amateescu commentedYup :)
Comment #21
alexpottThis issue addresses a critical bug and is allowed per https://www.drupal.org/core/beta-changes. Committed 33eb65a and pushed to 8.0.x. Thanks!