constant JSONAPI_FILTER_AMONG_OWN in Drupal 10
Same name and namespace in other branches
- 8 core/modules/jsonapi/jsonapi.module \JSONAPI_FILTER_AMONG_OWN
- 9 core/modules/jsonapi/jsonapi.module \JSONAPI_FILTER_AMONG_OWN
Array key for denoting type-based owned-only filtering access.
Array key for denoting access to filter among all entities of a given type, regardless of whether they are published or enabled, so long as they are owned by the user for whom access is being checked.
When filtering among User entities, this is used when access is being checked for an authenticated user and there's a query condition limiting the result set to just that user's entity object.
When filtering among entities of another type, this is used when all of the following conditions are met:
- Access is being checked for an authenticated user.
- The entity type has an "owner" entity key.
- There's a filter/query condition for the value equal to the user's ID.
See also
hook_jsonapi_entity_filter_access()
hook_jsonapi_ENTITY_TYPE_filter_access()
6 uses of JSONAPI_FILTER_AMONG_OWN
- hook_jsonapi_ENTITY_TYPE_filter_access in core/
modules/ jsonapi/ jsonapi.api.php - Controls access to filtering by entity data via JSON:API.
- jsonapi_jsonapi_node_filter_access in core/
modules/ jsonapi/ jsonapi.module - Implements hook_jsonapi_ENTITY_TYPE_filter_access() for 'node'.
- jsonapi_jsonapi_user_filter_access in core/
modules/ jsonapi/ jsonapi.module - Implements hook_jsonapi_ENTITY_TYPE_filter_access() for 'user'.
- jsonapi_jsonapi_workspace_filter_access in core/
modules/ jsonapi/ jsonapi.module - Implements hook_jsonapi_ENTITY_TYPE_filter_access() for 'workspace'.
- TemporaryQueryGuard::getAccessConditionForKnownSubsets in core/
modules/ jsonapi/ src/ Access/ TemporaryQueryGuard.php - Gets an access condition for the allowed JSONAPI_FILTER_AMONG_* subsets.
File
- core/
modules/ jsonapi/ jsonapi.module, line 78 - Module implementation file.
Code
const JSONAPI_FILTER_AMONG_OWN = 'filter_among_own';