I have five custom voters in my application and use strategy "consensus".
Sometimes my voters not work properly and after debugging I have found the reason.
The standard Symfony RoleHierarchyVoter always returns "1", therefore sum of "granted" results equals to sum of "deny" results. So, I need to disable this Voter, because I don't use RoleHierarchy.
1) How can I disable Voter in config?
2) Does it exist another solution for this issue?
Thanks a lot for any help!
UPDATED.
So, I have created own RoleHierarchyVoter which always return false. This Voter replace standard Voter, but I'm not sure this solution is true way. Maybe any other solutions?