struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rajat Pandit <>
Subject Re: Wanted API to handle user roles
Date Mon, 03 Nov 2003 16:12:27 GMT
hello zsolt,
i am currently working on a project with similar required. if  wonder if 
   u have read about ActionMapping. make your own custom mapping (by 
extending ActionMapping) and then define properties in it like getRole, 
setRole. and in the structs-config.xml file itself, mention the role 
allowed in that particular module.

in the user table, add another field called role. and make a level say 
0=> super user, 1=> Content Administrator 2=> Normal User etc. and then 
on the login you could save this in the session object and everytime a 
module is to be executed, you could check the role which has accesses to 
this module and compare it to the role stored in the session and take 
the necessary action.

hope this helps!!!

Zsolt Koppany wrote:

> Hi,
> I'm searching for a Java library to implement Role based access in a Web
> application. This API must support some kind of hierarchy. For example a
> user might have all roles in a project (project administrator) but only
> limited (or no) roles in an other project.
> As far as I know, tomcat supports only user based roles, thus a user has a
> role assigned to him everywhere.
> Any suggestion?
> Zsolt
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:


Rajat Pandit |
+91 612 3117606
[ Developer and Part Time Human Being]

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message