Issue #2241229 by Wim Leers: Followup: Aggregator Feed & Item content entity types, and AggregatorFeedBlock should use cache tags.

8.0.x
Nathaniel Catchpole 2014-07-18 17:22:03 +01:00
parent 7a9fae8f21
commit 9c86984c3c
1 changed files with 0 additions and 43 deletions

View File

@ -1,43 +0,0 @@
<?php
/**
* @file
* Contains \Drupal\aggregator\ItemAccessController.
*/
namespace Drupal\aggregator;
use Drupal\Core\Entity\EntityAccessController;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Session\AccountInterface;
/**
* Defines an access controller for the item entity.
*
* @see \Drupal\aggregator\Entity\Item
*/
class ItemAccessController extends EntityAccessController {
/**
* {@inheritdoc}
*/
protected function checkAccess(EntityInterface $entity, $operation, $langcode, AccountInterface $account) {
switch ($operation) {
case 'view':
return $account->hasPermission('access news feeds');
break;
default:
return $account->hasPermission('administer news feeds');
break;
}
}
/**
* {@inheritdoc}
*/
protected function checkCreateAccess(AccountInterface $account, array $context, $entity_bundle = NULL) {
return $account->hasPermission('administer news feeds');
}
}