For a JSF application running on JBoss 4.2 with JSF 1.2, Container Managed Security and EJB 3.0 I’m looking for a solution to have several roles combined in one role. For example:
- Roles: IT-Support, Phone-Support, Technical-Support, Deliver-Support
Now, I want to specify one role which includes for example three of these roles:
- Role: Senior-Suppoert (IT-Support, Technical-Support, Deliver-Support)
Is this possible with the container managed security and Jboss?
No, that’s not possible with container managed authorization facilities.
Even more, role inheritance is considered bad design. Just don’t do that. Depending on the concrete functional requirements, you could either auto-create the three additional roles when you specify the “global” role (or the other way round), or create a helper/utility method/function to check if the given user has all the three roles (thus, without creating an additional role).