This repository has been archived on 2025-01-19. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
drupalcampbristol/web/core/modules/views/src/ViewAccessControlHandler.php
2017-02-13 15:31:17 +00:00

29 lines
673 B
PHP

<?php
namespace Drupal\views;
use Drupal\Core\Access\AccessResult;
use Drupal\Core\Entity\EntityAccessControlHandler;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Session\AccountInterface;
/**
* Defines the access control handler for the view entity type.
*
* @see \Drupal\views\Entity\View
*/
class ViewAccessControlHandler extends EntityAccessControlHandler {
/**
* {@inheritdoc}
*/
public function checkAccess(EntityInterface $entity, $operation, AccountInterface $account) {
if ($operation == 'view') {
return AccessResult::allowed();
}
else {
return parent::checkAccess($entity, $operation, $account);
}
}
}