Need a logged in users full ACL hierarchy
===

I have run into an instance where I need to get all the roles a given user has access to. 

I have a database entry that stores a role needed to access it. In order to not query this database twice (once to get the role needed and once to re-query) I need to pass the query an array of the roles the user has access to.

I can use $this->container->get('security.context')->getToken()->getUser()->getRoles() but this only returns the roles the user has explicitly been granted and not the hierarchy.

I am also open to new approaches since I may be going about this wrong.

Thanks