php - How to filter my Doctrine queries with Symfony ACL -
php - How to filter my Doctrine queries with Symfony ACL -
symfony acl allows me grant access entity, , check it:
if (false === $securitycontext->isgranted('edit', $comment)) { throw new accessdeniedexception(); }
however, if have thousands of entities in database , user has access 10 of them, don't want load entities in memory , hydrate them.
how can simple "select * x" while filtering on entities user has access (at sql level)?
well there is: it's not possible.
in lastly year i've been working on alternative acl scheme allow filter straight in database queries.
my company agreed open source it, here is: http://myclabs.github.io/acl/
php symfony2 doctrine2 doctrine acl
Comments
Post a Comment