Support from Acquia helps fund testing for Drupal Acquia logo

Comments

moshe weitzman’s picture

Status: Needs review » Fixed

i modified the if clause and text a bit. commtted. thanks.

salvis’s picture

With

   $row->nid == 0

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.

moshe weitzman’s picture

not 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.

salvis’s picture

Sorry, 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.

moshe weitzman’s picture

committed thx.

salvis’s picture

Version: 7.x-1.x-dev » 5.x-1.x-dev
Status: Fixed » Reviewed & tested by the community
FileSize
818 bytes

Re-rolled for D5.

This is a straight copy/paste and can't be wrong, so marking RTBC.

Thanks for accepting hook_node_access_explain()!

moshe weitzman’s picture

Status: Reviewed & tested by the community » Fixed

committed to 5. thx.

moshe weitzman’s picture

i've now implemented this new hook in og. all node access modules are encouraged to do the same in your modules.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.