I am having problems with the same thing, actually.
web.xml contains:
| <security-role>
| <description/>
| <role-name>Administrators</role-name>
| </security-role>
| <security-role>
| <description/>
| <role-name>Users</role-name>
| </security-role>
|
portlet.xml contains:
| <security-role-ref>
| <role-name>Users</role-name>
| <role-link>Users</role-link>
| </security-role-ref>
| <security-role-ref>
| <role-name>Administrators</role-name>
| <role-link>Administrators</role-link>
| </security-role-ref>
|
and I'm trying to run the following code:
| if(request.isUserInRole("Administrators"))
| System.out.println("Administrators");
| else if(request.isUserInRole("Users"))
| System.out.println("Users");
| else
| System.out.println("user is in an unknown role");
|
The final else clause catches everything, no matter which account logs in. I've tried
this in many different ways, changing capitalization and whether or not there is an
's' on the end. Nothing has worked so far.
Is there something I'm missing in the XML configs?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4056148#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...