I used SonataUser with FOSUser to manage my users and created a custom field company
to attach each one to a given company.
Now I\'d simply need to give
As I didn't need ACLs here, (only voters) I used the role security handler of sonata.
But I had issues using it because its default implementation of isGranted()
doesn't pass the current object to the voter.
So I had to extend it, check my monologue in this github issue for more detail.
By the way, my PR was accepted about this issue