I\'m trying to setup hierarchical roles in my Spring Boot app without success. I\'ve done all that\'s been said in different places in the Internet. But with none of them ha
You need to set the role hierarchy on the web expression voter. Something like:
DefaultWebSecurityExpressionHandler expressionHandler = new DefaultWebSecurityExpressionHandler();
expressionHandler.setRoleHierarchy(roleHierarchy);
webExpressionVoter.setExpressionHandler(expressionHandler);
Update: You could also try setting the the above expression handler like this:
http
.authorizeRequests()
.expressionHandler(expressionHandler)
...