Issue #3452426 by mxr576, kristiaanvandeneynde: Insufficient cacheability...
Issue #3452426 by mxr576, kristiaanvandeneynde: Insufficient cacheability information bubbled up by UserAccessControlHandler
(cherry picked from commit 9fc1bc9a)
$result->setReason("The 'access user profiles' permission is required and the user must be active.");
}
// Users can view own profiles at all times.
elseif($account->id()==$entity->id()){
returnAccessResult::allowed()->cachePerUser();
if($result->isAllowed()){
return$result;
}
else{
returnAccessResultNeutral::neutral("The 'access user profiles' permission is required and the user must be active.")->cachePerPermissions()->addCacheableDependency($entity);