The Media Gallery modules seems not to work with the content access module (http://drupal.org/project/content_access). Is the node-based (not node-type-based) access control of content access supported?
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | gallery_teasers_node_access-1147906-5.patch | 1.22 KB | Austin808 |
Comments
Comment #1
Austin808 commentedI ran into the same issue that Content Access would allow a user to see the gallery in the All Galleries page, but would block a user from viewing the gallery by displaying an Access Denied page when viewing a protected gallery.
I expected that galleries that should not be viewed by the user should not be displayed.
I tracked the issue to the following function in media_gallery.module:
This function pulls a list of node ids of all the galleries.
This query pulls from the taxonomy_index table and not the node table. I think this was preventing the node_access tag to retrieve accessible nodes.
I have rewritten the function to pull from the node table. I would write a patch, but not too familiar with git yet.
Comment #2
Austin808 commentedComment #3
effulgentsia commentedThanks for digging in. A patch and testing results from others would be very helpful.
Comment #4
effulgentsia commentedComment #5
Austin808 commentedI have created a patch against the beta5 release. This is my first patch hope I did it correctly.
Comment #6
David_Rothstein commentedThis bug was due to a security issue in Drupal core, fixed in Drupal 7.3 (SA-CORE-2011-002).
I just checked now that I was able to reproduce the problem using Drupal 7.2, but not using Drupal 7.3 (or higher). So, this is fixed. Thanks for everyone's work looking into it, though!