sonata-project/SonataAdminBundle — pull request #2093 by cassianotartari (2014-04-25 13:40:58+00:00)
Title: Update RoleSecurityHandler.php

Just call the isGranted with object first than without it. I'm using "strategy: unanimous" and I was with the same problem reported in this issue: https://github.com/sonata-project/SonataAdminBundle/issues/1458 and PR: https://github.com/sonata-project/SonataAdminBundle/pull/1507 but I'm using "sonata.admin.security.handler.role". I'm coding a custom voter and I was receiving a NULL object without this code modification.