function jsonapi_jsonapi_entity_test_filter_access in JSON:API 8.2
Same name and namespace in other branches
- 8 jsonapi.module \jsonapi_jsonapi_entity_test_filter_access()
Implements hook_jsonapi_ENTITY_TYPE_filter_access() for 'entity_test'.
File
- ./
jsonapi.module, line 232 - Module implementation file.
Code
function jsonapi_jsonapi_entity_test_filter_access(EntityTypeInterface $entity_type, AccountInterface $account) {
// @see \Drupal\entity_test\EntityTestAccessControlHandler::checkAccess()
return [
JSONAPI_FILTER_AMONG_ALL => AccessResult::allowedIfHasPermission($account, 'view test entity'),
];
}