Hi,
I'm trying to use the "identity.hasRole" method in the authenticator class
but the result is always false.
So, for example, if I put this code in the authenticate method:
identity.addRole( new String( "account_admin" ) );
and then I test (in the same method)
System.out.println( "### account_admin: " + identity.hasRole( new String(
"account_admin" ) ) );
The result is always "false". Why? How do you test then the roles a user has? I
would need to add on the session context some data, that are strictly related to the roles
the user has. The roles are loaded from the DB, and placed in the Identity object. But
then when I need to create dynamic content based on the roles I can't find any role.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4045416#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...