new EntityCondition('uri', 'public://', 'STARTS_WITH'
),
new EntityCondition('uid',
$current_user->
id()),
]);
$cacheability->
addCacheTags($entity_type->
getListCacheTags());
break;
case 'shortcut':
// Unless the user can administer shortcuts, allow access only to the
// user's currently displayed shortcut set.
// @see \Drupal\shortcut\ShortcutAccessControlHandler::checkAccess()
if (!
$current_user->
hasPermission('administer shortcuts'
)) { $specific_condition =
new EntityCondition('shortcut_set',
shortcut_current_displayed_set()->
id());
$cacheability->
addCacheContexts(['user'
]);
$cacheability->
addCacheTags($entity_type->
getListCacheTags());
} break;
case 'user':
// Disallow querying values of the anonymous user.
// @see \Drupal\user\UserAccessControlHandler::checkAccess()
$specific_condition =
new EntityCondition('uid', '0', '!='
);
break;
}