[jboss-user] [JBoss Portal] - Programmatic security

thanksforfish do-not-reply at jboss.com
Thu Sep 25 10:43:24 EDT 2008


Hi there,

Maybe this is a silly question, however....

I have security roles in my portlet.xml which i check using isuserinrole in my portlet java file:

System.out.println("checking roles in java");
if (request.isUserInRole("Admin")) {
	System.out.println("in Admin");
}
if (request.isUserInRole("User")) {
	System.out.println("in User");
}

This prints "in User" when i run the portlet.
If I duplicate that code in a scriptlet in the destination jsp I get no output (ie isuserinrole always returns false).
How is this possible, have i missed something obvious ?

Thanks for any help.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4178843#4178843

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4178843



More information about the jboss-user mailing list