0

I'm using the book_access module (https://www.drupal.org/project/book_access) and I'm finding that it has a good deal of bugs in it.

One thing I've found is in views 3.x, when I'm using a relationship to add the data for the top-level book in a view, and grouping the view results by the top level book, every node that isn't currently in a book doesn't show up since it seems that views isn't getting access permissions for anonymous users.

Though, when book_access is disabled, or if node_access permissions are bypassed, these items nodes show up in the view for anonymous users without any issue.

I'm trying to troubleshoot this, and I'm wondering if anyone knows the exact point at which Views 3.x takes node_access permissions into account so I can muck with some debug statements, etc. Can any one help out?

2

Views adds the node_access tag to it's queries, which allows the implementation of hook_query_TAG_alter in the node module to intercept the query and the joins needed to respect node access grants.

The "Disable SQL re-writing" checkbox in the Query options under the advanced settings for the view can disable this behaviour.

  • I knew you could disable it that way, but I really just needed to figure out at what point it's actually saying that access is denied so I can figure out what the deal is... Thanks, this is a huge help! – ZroonStack Apr 15 '15 at 15:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.