You have direct access to the subject via Identity.getSubject(), if you want to remove all
the roles simply iterate through the principals in the subject until you find the
"Roles" group. Here's an example:
| for ( Group sg : Identity.instance().getSubject().getPrincipals(Group.class) )
| {
| if ( Identity.ROLES_GROUP.equals( sg.getName() ) )
| {
| Identity.instance().getSubject().getPrincipals().remove(sg);
| break;
| }
| }
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4034604#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...