I have some entities collection with class permissions but without object permissions, when preloading ACL's on these classes I've got some ACL exceptions :
Symfony\Component\Security\Acl\Exception\NotAllAclsFoundException
The provider could not find ACLs for all object identities.
If I catch this exception on my domain code, preloading became useless and acl checking is making a lot of queries.
A solution would be to handle the exception and retrieve partial results.
Something like that in preload method :
try {
$results = $this->cache->cache($objects, $token);
}
catch (NotAllAclsFoundException $e){
$results = $e->getPartialResult();
}
return $results;
I have some entities collection with class permissions but without object permissions, when preloading ACL's on these classes I've got some ACL exceptions :
If I catch this exception on my domain code, preloading became useless and acl checking is making a lot of queries.
A solution would be to handle the exception and retrieve partial results.
Something like that in preload method :