When the node access callback try to index node access info, it assumes that if anonymous users can view the node in the current context, then it's a public node with no special restriction that should always be viewable by anonymous :
// Check whether all users have access to the node.
if (!node_access('view', $node, $account)) {
[...]
}
else {
// Add the generic view grant if we are not using node access or the
// node is viewable by anonymous users.
$items[$id]->search_api_access_node = array('node_access__all');
}
This is not true for some custom node access modules declaring their own realms, for example according to the domain: the node might be publicly viewable on a domain but not on another.
Here's a patch that solves this.
| Comment | File | Size | Author |
|---|---|---|---|
| search_api-fix_access_info_indexing.patch | 1.93 KB | gaëlg |
Comments
Comment #1
drunken monkeyThanks a lot for the suggestion and patch!
See #1617794-19: Make "Node access" compatible with additional contrib modules: it would be good to merge the "Node access" patches to get more testers, ensure they are compatible with each other, etc. I'll try to think of crediting you separately for your part of the patch still, though. (But feel free to also remind me of that when the patch is RTBC.)
Comment #2
betz commentedAny progress on this?
Organic groups content visibility permissions are not applied...
Comment #3
FreeAndEasy commentedThis patch works great for domain access!