Closed (fixed)
Project:
Drupal core
Version:
11.x-dev
Component:
node system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
6 Jan 2015 at 16:20 UTC
Updated:
14 Jul 2025 at 06:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
chx commentedComment #2
xjmI'd clarify why ('all' is a special reserved realm etc.).
Eh?
Comment explaining the typecast would be good.
Why removing this?
Comment #3
chx commented1. Clarified.
2. Clarified.
3. Clarified.
4. Because it's false information. alterQuery has no return value. It's a copy-paste and completely bogus.
Comment #4
chx commentedEven if this revision is not liked, the
$grant['langcode']should be swapped out for$grant_langcode;to make it more clear IMO.And then we need to talk about storing node 0 grants in a followup.
Comment #5
xjmSo, hm. This is confusing. See the docs for hook_node_access_records().
Comment #6
xjmWhoops. I was going to RTBC, but then had second thoughts as in #5. ;)
Comment #7
chx commentedSure, let's remove the 'all' part. It seems the special handling code in write is never called and probably $realm should be removed from the write() function header.
Comment #8
jhedstromComment #9
ravi.khetri commentedReRolled.
Comment #15
googletorp commentedClean up whitespace in patch from 9.
Comment #23
neclimdulWhitespace fix and re-roll.
Comment #24
neclimdulSelf review and update.
This same documentation is used for
which just proxies through to the storage interface so they should match. I think its kinda confusing that 'view all' is the op 'view' but that matches the hook_node_grants() documentation so I guess that's fine.
Came here for the weird anonymous function fix but the rest looks good. Don't think its right to RTBC myself but reviewing this everything looks right so I can't see a reason this isn't ready to go.
Comment #25
neclimdulBumping release for tests
Comment #28
neclimdulThose failures... I don't understand how book is the only thing catching the node access cache context logic. Its even worse then that too because the failures are all because my automated re-roll kept a cache context that no-longer exists. It might have broke the whole thing and we wouldn't know :( :( :(
#2946073: Node grant access check missing cacheable dependency on node is working to fix part of this but clearly we need some tests around this big complex chunk of code.
Anyways, here's a patch that restores the cache context logic.
Comment #29
ravi.shankar commentedComment #35
smustgrave commentedChanging to a task as this seems more like an improvement than a bug.
Comment #36
smustgrave commentedRerolled for 9.5.x
Comment #38
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #42
acbramley commentedRolled #36 into an MR with 2 omissions:
1. The node.api.php docs changes didn't apply and it was hard to figure out where they were actually meant to go (those docs have since changed quite a bit). I'm happy for someone to put them back
2. The docs changes to checkAllGrants - I may be wrong but it looks like it's checking more than "view all"?
I also added back
$access_result->addCacheContexts(['user.node_grants:' . $operation]);Comment #43
smustgrave commentedHaven't reviewed but could IS be updated please.
Comment #44
acbramley commentedUpdated
Comment #45
smustgrave commentedThanks, seems to have a valid test failure. Am tagging for title update as I've seen general titles before kicked back so trying to avoid that.
Comment #46
acbramley commentedTest failure was a random.
Comment #47
smustgrave commentedBelieve all feedback has been addressed.
Comment #48
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #49
acbramley commentedForgot to set back to rtbc post rebase.
Comment #50
xjmSaving issue credits.
Comment #52
larowlanCommitted to 11.x - nice to see this one solved after so many years 💪