Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
As requested in http://drupal.org/node/210031#comment-691790.
It returns 'default grant' -- is that ok?
Comment | File | Size | Author |
---|---|---|---|
#6 | devel_node_access.explain_all.6.D5.patch | 818 bytes | salvis |
#4 | devel_node_access.explain_all.4.D6.patch | 829 bytes | salvis |
devel_node_access.explain_all.D6.patch | 674 bytes | salvis | |
Comments
Comment #1
moshe weitzman CreditAttribution: moshe weitzman commentedi modified the if clause and text a bit. commtted. thanks.
Comment #2
salvisWith
you've tightened the if a bit too much. I get the nid(s) of the node(s) that are currently showing, not 0, and dna is even showing the node title(s).
Also wondering whether there might be other grants than 1/0/0, in which case the text would be wrong.
Comment #3
moshe weitzman CreditAttribution: moshe weitzman commentednot sure i understand. but anyway, i added the check for nid == 0 so that i could use the text than mentions view specifically. no other module defined a record for nid == 0.
Comment #4
salvisSorry, this was too short.
The
0 / all / 0 / 1 / 0 / 0
record is only present if no node access module is installed. Installing one (e.g. ACL), even if it isn't active, causes Drupal to replace that one record with
NID / all / 0 / 1 / 0 / 0
records, one for each node.
So, I propose the attached change to HEAD.
Comment #5
moshe weitzman CreditAttribution: moshe weitzman commentedcommitted thx.
Comment #6
salvisRe-rolled for D5.
This is a straight copy/paste and can't be wrong, so marking RTBC.
Thanks for accepting hook_node_access_explain()!
Comment #7
moshe weitzman CreditAttribution: moshe weitzman commentedcommitted to 5. thx.
Comment #8
moshe weitzman CreditAttribution: moshe weitzman commentedi've now implemented this new hook in og. all node access modules are encouraged to do the same in your modules.
Comment #9
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.