function jsonapi_jsonapi_block_content_filter_access in Drupal 8
Same name and namespace in other branches
- 9 core/modules/jsonapi/jsonapi.module \jsonapi_jsonapi_block_content_filter_access()
Implements hook_jsonapi_ENTITY_TYPE_filter_access() for 'block_content'.
File
- core/
modules/ jsonapi/ jsonapi.module, line 191 - Module implementation file.
Code
function jsonapi_jsonapi_block_content_filter_access(EntityTypeInterface $entity_type, AccountInterface $account) {
// @see \Drupal\block_content\BlockContentAccessControlHandler::checkAccess()
// \Drupal\jsonapi\Access\TemporaryQueryGuard adds the condition for
// (isReusable()), so this does not have to.
return [
JSONAPI_FILTER_AMONG_PUBLISHED => AccessResult::allowed(),
];
}