ProblematicAclManagerBundle icon indicating copy to clipboard operation
ProblematicAclManagerBundle copied to clipboard

Transactionalization of AclManager database calls

Open Problematic opened this issue 14 years ago • 0 comments

Right now, there are potentially a LOT of database calls being made by the ACL Manager. I implemented some rudimentary transactionalization in processPermissions(), but it could be a lot better. Something like this, perhaps:

$aclManager->beginTransaction('identifier');
// ... add permission contexts
$aclManager->loadAcl($entity1)->processPermissions();
$aclManager->loadAcl($entity2)->processPermissions();
$aclManager->commit();

Right now, the DB is being hit at least twice, once for each call to processPermissions(). With a transaction manager, it could be condensed.

Problematic avatar May 17 '11 17:05 Problematic