Skip to content

[Enhancement] ACL preload partial result handling #28

Description

@eliecharra

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;

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions