I use xdoclet and since Struts 1.1 you can do something like this in your
Action class where you can specify the list of Roles that have access to
this action.

/**
 * @struts.action
 *      name="CustomerCreateForm"
 *      path="/operator/customers/customer/CustomerAddAction"
 *      input="/operator/customers/customer/CustomerCreatePage.jsp"
 *      scope="request"
 *      validate="true"
 *        roles = "Admin,Operator"
...

However I have settled for declarative security with JBossSX and define the
context relative URLs to protect with specified roles in my web.xml.  But I
presume you are doing this anyway if using JBossSX.


> -----Original Message-----
> From: news [mailto:[EMAIL PROTECTED] On Behalf Of marc
> Sent: Friday, 3 June 2005 10:03 PM
> To: user@struts.apache.org
> Subject: Re: How do I use JAAS(JbossSX) in Struts?
> 
> Yeah looks cool and works with Velocity. I'm working on getting it to
> work in me project.
> 
> But I still need to have access controls on me different action's.
> 
> 
> 
> Vance Karimi wrote:
> > Have a look at the Struts Menu plugin
> > http://struts-menu.sourceforge.net/
> >
> >
> >
> >
> >>-----Original Message-----
> >>From: news [mailto:[EMAIL PROTECTED] On Behalf Of marc
> >>Sent: Friday, 3 June 2005 5:51 PM
> >>To: user@struts.apache.org
> >>Subject: How do I use JAAS(JbossSX) in Struts?
> >>
> >>Now I have made a Struts app, that uses a LoginContext (Using
> >>jbossSX/JAAS) to login. And this works fin.
> >>
> >>But now I what to use the attibutes from the logincontext for more.
> >>And what to be able to make menu's based on what role the user have. I
> >>what to be able to set access controls to different action's base on
> >>user roles. And other fancy things.
> >>
> >>Is there a easy way to do this in struts. A plugin or something?
> >>
> >>Or do anybody now some where I can read more abort it?
> >>
> >>
> >>best regards and you all have a nice weekend.
> >>
> >>\-Marc-/
> >>
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


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

Reply via email to