Change record status: 
Project: 
Introduced in branch: 
8.x-1.x
Introduced in version: 
8.x-1.14
Description: 

Historically access checks on data sources were returning a boolean value of TRUE if a given user has access to a given item, or FALSE when the user does not have access. Starting with Search API 8.x-1.14 this has been changed to return AccessResultInterface objects which contain the full cacheability metadata.

Code examples

Before

$access = $datasource->checkItemAccess($item);
if ($access) {
  // Do something which requires access.
}

After

$access_result = $datasource->getItemAccessResult($item);
if ($access_result->isAllowed()) {
  // Do something which requires access.
}
Impacts: 
Module developers