function jsonapi_jsonapi_media_filter_access
Same name in other branches
- 9 core/modules/jsonapi/jsonapi.module \jsonapi_jsonapi_media_filter_access()
- 10 core/modules/jsonapi/jsonapi.module \jsonapi_jsonapi_media_filter_access()
- 11.x core/modules/jsonapi/jsonapi.module \jsonapi_jsonapi_media_filter_access()
Implements hook_jsonapi_ENTITY_TYPE_filter_access() for 'media'.
File
-
core/
modules/ jsonapi/ jsonapi.module, line 238
Code
function jsonapi_jsonapi_media_filter_access(EntityTypeInterface $entity_type, AccountInterface $account) {
// @see \Drupal\media\MediaAccessControlHandler::checkAccess()
return [
JSONAPI_FILTER_AMONG_PUBLISHED => AccessResult::allowedIfHasPermission($account, 'view media'),
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.