struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul-J Woodward" <paul-j.woodw...@db.com>
Subject Re: Role based access?
Date Wed, 18 Feb 2004 20:37:47 GMT

If you override the RequestProcessor, I believe you will need to add this to the struts-confg.xml:

      <controller processorClass="com.db.gci.ge.epg.struts.tiles.LocalRequestProcessor"
locale="false" nocache="true" inputForward="true" />

Change it to suit your needs.

Paul
------------------------------------------------------------
Global Equity Derivatives Technology
Deutsche Bank [/]
------------------------------------------------------------


                                                                                         
                                                                                         
                           
                      Nadeem Bitar                                                       
                                                                                         
                           
                      <nadim@izucode.co        To:       Struts Users Mailing List <struts-user@jakarta.apache.org>
                                                                                         
 
                      m>                       cc:                                    
                                                                                         
                              
                                               Subject:  Re: Role based access?          
                                                                                         
                           
                      18/02/2004 20:11                                                   
                                                                                         
                           
                      Please respond to                                                  
                                                                                         
                           
                      "Struts Users                                                      
                                                                                         
                           
                      Mailing List"                                                      
                                                                                         
                           
                                                                                         
                                                                                         
                           
                                                                                         
                                                                                         
                           




processRoles method is in RequestProcessor.
You would do something like this:

boolean processRoles(HttpServletRequest request, HttpServletResponse
response, ActionMapping mapping) throws Exception{
 if(roles == null || roles.length == 0)
             return true
  for(int i=0; i<roles.length; i++){
        //using your custom security scheme usually something like that
        if(request.isUserInRole(roles[i]))
                         return true;
  }
  return false;

}
On Thu, 2004-02-19 at 01:26 +0530, subramaniam.o@tcs.com wrote:
> Hi,
> Thanks for the info Nadeem.but processRoles method is in which Class.
> could you give me some samples.
> Thanks in advance
>
>
> Subramaniam Olaganthan
> Tata Consultancy Services
> Mailto: subramaniam.o@tcs.com
> Website: http://www.tcs.com
>
>
> Nadeem Bitar <nadim@izucode.com>
>
> 02/19/2004 12:59 AM
>          Please respond to
>     "Struts Users Mailing List"
>  <struts-user@jakarta.apache.org>
>
>
>                To
> Struts Users
> Mailing List
> <struts-
> user@jakarta.
> apache.org>
>                cc
>           Subject
> Re: Role based
> access?
>
>
>
> You have to use JAAS. If you are not using JAAS and still want to use
> the roles attribute in your action mapping you have to override the
> processRoles method .
>
>
> On Wed, 2004-02-18 at 20:49 +0530, subramaniam.o@tcs.com wrote:
> > Hi Guys,
> >
> > Struts-config.xml
> >                 <action attribute="Form"   roles="userRole">
> >
> > How do i use this 'roles' attribute to implement role-based access.
> >
> > Thanks and Regards
> >
> > Subramaniam Olaganthan
> > Tata Consultancy Services
> > Mailto: subramaniam.o@tcs.com
> > Website: http://www.tcs.com
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
> ForwardSourceID:NT00003A5E
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org






--

This e-mail may contain confidential and/or privileged information. If you are not the intended
recipient (or have received this e-mail in error) please notify the sender immediately and
destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material
in this e-mail is strictly forbidden.



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message