I'm using the Sonata-Admin bundle with ACL, but I have to create some objects programmatically. But I can't figure out how I properly update the ACL tables for the created entity. So I always have to execute
php app/console sonata:admin:generate-object-acl
which is of course not a permanent solution.
I tried doing it like described here: http://symfony.com/doc/current/cookbook/security/acl.html#creating-an-acl-and-adding-an-ace so I implement the DomainObjectInterface in my entity and added the getObjectIdentifier method.
But now I'm getting an Symfony\Component\Security\Acl\Exception\AclAlreadyExistsException exception when executing:
php app/console sonata:admin:generate-object-acl
So I guess that's not the proper way to do it when using sonata-admin. But I can't find anything in the docs.