Hi all,
I am trying to get my portlet to check if a user has a given permission that I
created in the Admin portlet, namely a 'delete' permission. I have assigned
this permission to a role, and the user has this role. What I am doing in the
portlet (a VelocityPortlet) is:
boolean hasDelete = JetspeedSecurity.checkPermission((JetspeedUser)rundata,
currentPortlet, "delete");
System.out.println("hasDelete? "+hasDelete);
And the output is false!
My setup:
Windows 2000
Jetspeed 1.5
MySQL 4.0.18
Tomcat 5.0.28
Curiously, another thing I noticed was that I changed the role on the default
turbine user, from 'user' to 'guest', and when I logged in as turbine, I could
still see the 'action' icons when I should only have 'view' permissions.
Any pointers on how to correctly do the permission check (without having to do
a direct query on the database?
Regards
Ruy
__________________________________
Do you Yahoo!?
The all-new My Yahoo! - Get yours free!
http://my.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]