Commit 3bda72c4 authored by akalam's avatar akalam

Fix regresion on AccessResult cachePerUser

parent 8dc58089
......@@ -3,6 +3,7 @@
namespace Drupal\node_authlink\Access;
use Drupal\Core\Access\AccessResult;
use Drupal\Core\Access\AccessResultInterface;
use Drupal\Core\Session\AccountInterface;
use Drupal\node\Access\NodeRevisionAccessCheck as NodeRevisionAccessCheckOriginal;
use Drupal\node\NodeInterface;
......@@ -24,7 +25,9 @@ class NodeRevisionAccessCheck extends NodeRevisionAccessCheckOriginal {
else {
$result = parent::checkAccess($node, $account, $op);
}
$result->cachePerUser();
if ($result instanceof AccessResultInterface) {
$result->cachePerUser();
}
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