Commit c1cc3040 authored by akalam's avatar akalam

AccessResult should be cached per user on nodeaccess check.

parent 85ebd510
......@@ -19,10 +19,14 @@ class NodeRevisionAccessCheck extends NodeRevisionAccessCheckOriginal {
*/
public function checkAccess(NodeInterface $node, AccountInterface $account, $op = 'view') {
if (!$node->isDefaultRevision() && node_authlink_node_is_enabled($node) && node_authlink_check_authlink($node, $op, $account)) {
return AccessResult::allowed();
$result = AccessResult::allowed();
}
else {
$result = parent::checkAccess($node, $account, $op);
}
$result->cachePerUser();
return parent::checkAccess($node, $account, $op);
return $result;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment