Multiple Node Access Permissions Support
| Project: | Apache Solr Search Integration |
| Version: | 6.x-1.0-rc3 |
| Component: | Node access |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Installed Apache Solr Search Integration with OG and Taxonomy Access Permissions (TAC). Enabled Apache Solr Node Access. Works with OG. I read somewhere that the maintainer says it also works with Taxonomy Access Permissions Lite.
The problem is, it doesn't work with both:
If I have a node that is in a group, marked public, but has TAC permissions that only allow a subset of group users to view it, ALL anonymous users can see it in their search results.
In other words, if OG says it's "Public", then anonymous users can see it even if it is otherwise restricted by TAC.
This is basically how the core Drupal node access system works: If one access control module says you can see it, then you can see it regardless of what other node access control modules say.
Because this is the way core Drupal works, it is not a bug. But, I'd like to investigate if it is possible to make Apache Solr Node Access support multiple node access controls.
I know that node_access() and node_access_grants_sql() are bringing back the results I seek. Because Apache Solr Node Access appears to be building it's own node access table, I'm out of luck there.
If I create a module and implement hook_apachesolr_modify_query() in it, could that override the subqueries that are inserted by apachesolr_nodeaccess_apachesolr_modify_query(), or simply add to them?

#1
I need to pose this question in a different way.
#2
Check out this issue - #556426: Content Access + Domain Access - ApacheSolr returns all the results not respecting the node access permissions.
It seems to be the same issue as you are describing here.