Shiro support the concept of role inheritance roleA inherits permissions
from roleB
A given realm knows only its roles, but my
application understands the mapping of roles to permissions (or nested
roles). I have a single RolePermissionResolver that ties permissions
to roles
Example:
My security Manager:
https://github.com/sonatype/security/blob/master/security-system/src/main/java/org/sonatype/security/DefaultRealmSecurityManager.java#L63
My RolePermissionResolver
https://github.com/sonatype/security/blob/master/security-realms/security-xml-realm/src/main/java/org/sonatype/security/realms/XmlRolePermissionResolver.java#L47
The quickstarts demonstrate JBoss AS 7, Java EE 6 and a few additional technologies. They provide small, specific, working examples that can be used as a reference for your own project