This content has been marked as final.
Show 2 replies
-
1. Re: how to get user roles after the user logged in
sgallet Mar 1, 2005 11:37 AM (in response to choikim)"choikim" wrote:
I'm using form based declarative security using mysql database.
After the user logged in, I want to display different selections on the screen
depending on the role the user has using jsp or servlet.
I can get the username using request.getRemoteUser(), but is there any way
that I can get user roles from a pre-defined variables or functions?
Or should I have to query the database again to know the role of the user ?
Or is there any way that I can set it up ?
Thank you for your help.
You can try the request.isUserInRole(role) function -
2. Re: how to get user roles after the user logged in
tom-the-bomb Mar 1, 2005 3:20 PM (in response to choikim)have a look at getUserRoles
here: http://www.jboss.org/wiki/Wiki.jsp?page=JaasSecurityManagerService