The only way i found to fix this was preventing the conflicting hook from running:
function myModule_module_implements_alter(&$implementations, $hook) {
if ($hook == 'node_access') {
unset($implementations['conflicting_module']); // Not any more
}
}
As it contains useful functionality, i'm running it in my own code, should my conditions for allowed not apply:
function myModule_node_access(NodeInterface $node, $op, AccountInterface $account) {
if ($account->isAuthenticated() and myConditionIsTrue()) {
return AccessResult::allowed();
}
// Run removed hook
if (function_exists('conflicting_module_node_access')) {
return conflicting_module_node_access($node, $op, $account);
}
return AccessResult::neutral();
}
This is less than ideal and i would prefer an alternative.