ViewAccessControlHandler.php 657 Bytes
Newer Older
1 2 3 4
<?php

/**
 * @file
5
 * Contains \Drupal\views\ViewAccessControlHandler.
6 7 8 9
 */

namespace Drupal\views;

10
use Drupal\Core\Entity\EntityAccessControlHandler;
11 12 13 14
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Session\AccountInterface;

/**
15 16 17
 * Defines the access control handler for the view entity type.
 *
 * @see \Drupal\views\Entity\View
18
 */
19
class ViewAccessControlHandler extends EntityAccessControlHandler {
20 21 22 23

  /**
   * {@inheritdoc}
   */
24 25
  public function checkAccess(EntityInterface $entity, $operation, $langcode, AccountInterface $account) {
    return $operation == 'view' || parent::checkAccess($entity, $operation, $langcode, $account);
26 27
  }

28
}