There have been several discussions on this list about how security should be loosely coupled with the ActionServlet itself (a filter on top of the application), but I am curious to know the best practicing for handling the following type of case.
Assume I have an action with a path of /EditAccount. Naturally if a user is not logged in, this path should be protected via filtering. However, /EditAccount has two purposes, one for the regular user to edit his/her own account, but also for the administrator to edit any user account via the query string ?user=username. In this case, I have to check in the action class if the user is allowed to take on the role of another user in which case the form is populated with that user's data or, if not, the form should populate with the user's own data. Is this something that is reasonable to do in the action, or should I create another action path /EditUserAccount?user=username and filter that to only admins and then forward to the /EditAccount once the proper credientials have been established, hence relieving the action behind /EditAccount from looking at any roles? Dan -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Daniel Allen, <[EMAIL PROTECTED]> http://www.mojavelinux.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "If you are going to play the game of trial and error, don't be surprised when the results are revealing. -- me" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

