You are here

NodeRevisionAccessCheck.php in Multiversion 8

Same filename and directory in other branches
  1. 8.2 src/Access/NodeRevisionAccessCheck.php

File

src/Access/NodeRevisionAccessCheck.php
View source
<?php

namespace Drupal\multiversion\Access;

use Drupal\Core\Session\AccountInterface;
use Drupal\node\Access\NodeRevisionAccessCheck as CoreNodeRevisionAccessCheck;
use Drupal\node\NodeInterface;
class NodeRevisionAccessCheck extends CoreNodeRevisionAccessCheck {
  public function checkAccess(NodeInterface $node, AccountInterface $account, $op = 'view') {
    if ($op == 'view' || $op == 'update') {
      return parent::checkAccess($node, $account, $op);
    }
    else {
      return FALSE;
    }
  }

}

Classes