I have a requirement that the j2ee roles for any given user may change dynamically in any
given user session.
I am using container managed security, buy how do I capture JBosses role checking code to
call into my following code?:
getMySessionBean().isUserInRole(java.security.Principal);
At the moment JBoss asks for a list of roles for a user when you log on, i.e.
| public Group[] getRoleSets()
| {
| SimpleGroup callerPrincipal = new SimpleGroup("CallerPrincipal");
| callerPrincipal.addMember(identity);
| SimpleGroup s = new SimpleGroup("Roles");
| s.addMember(new SimplePrincipal("a.j2ee.role"));
| s.addMember(new SimplePrincipal("b.j2ee.role"));
| return new Group[] { s, callerPrincipal};
| }
|
But I want to be able to calculate if a user has a given role at runtime using my own
isUserInRole(Principal) method?
Thanks in advance.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3959099#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...