David,

Comments follow.

On Wed, 2002-04-10 at 19:29, David Morris wrote:
> Scott,
> 
> What is the feasibility of pulling roles from something like Tomcat? 

I'm not sure.  As Vic has pointed out, any spec. compliant JSP container
should support roles.  But I'm not familiar with how one would access
all the necessary information through the standard API (if it's
possible).  I'll have to look into it.


> On the surface, it would be better to check the tomcat_users and 
> web.xml files and filter out pages that the user is unauthorized to. 

I'm not certain I see the relation between filtering out pages and the
menu.  Do you mean to somehow relate the menu item that is linked to a
page internal to the application such that if the user has no access to
that page, the menu item would not display?  I'm not intimately familiar
with security roles and how they are utilized in JSP applications, so
perhaps I'm missing your point.

> Does your menu do this or would it be useful to you?
> 
It doesn't do this.  The scope of what I'm trying to address is how to
support the disabling of a particular menu (or submenu) based on some
configuration, permissions set, or whatever.  I'm thinking I will just
provide a generic adapter interface that users can implement and perform
their permission checks however they choose.  If you want it to do some
kind of checks on security roles, then implement it.  If you want to
query a database for user permissions, then implement it.  Just provide
the adapter to StrutsMenu and it will handle disabling the menus.


Any comments or questions are welcome. :)

Thanks

Scott

> David Morris
> 
> >>> [EMAIL PROTECTED] 04/10/02 11:51AM >>>
> On Mon, 2002-04-08 at 08:12, Jon.Ridgway wrote: 
> > Hi All,
> > 
> > I was wondering if there are any plans add the following to the
> Struts menu:
> > 
> > -Support for roles
> I don't currently have plans to support roles.  However, I am working
> out an implementation for generically supporting permission checking. 
> This could easily be tied into checking roles as well.  I'll have to
> think about it some more. 
> 
> > -Support for locales (might already be their can't see how to use
> however)
> Localization is already supported.  However, it does not automatically
> use the main MessageResources used in Struts apps (keyed by
> Action.MESSAGES_KEY).  At this point, you need to pass the attribute
> key
> of the MessageResources you want to use.  For example: 
> 
> <menu:useMenuDisplayer 
>      name="CoolMenus" bundle="<%=Action.MESSAGES_KEY%>"> 
> 
> Check the example menu application. 
> 
> > -Support for struts-config forwards.
> > 
> Sounds like a good idea.  I'll put it on the ToDo list...
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 






--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to