struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From François Rouxel <rouxe...@yahoo.com>
Subject Re : s2: howto protect a method with annotation
Date Thu, 01 Jan 2009 00:07:51 GMT
Yes sure
You can use an interceptor 

<interceptor-refname="roles"></interceptor-ref>
 
as simple as that :-)
 
fr/
 <paramname="allowedRoles">Manager</param>____________________________________________
____________________________________________ 



----- Message d'origine ----
De : xianwinwin <xianwinwin@gmail.com>
À : user@struts.apache.org
Envoyé le : Mercredi, 31 Décembre 2008, 18h03mn 22s
Objet : s2: howto protect a method with annotation


Hi all,

I have a class with different methods. I have 2 type of users:
Employee and Manager

my XML looks like this:

<action name="work_*"  method="{1}" class="com.struts.WorkAction">           

    <result name="file" type="tiles">fileLayout</result>
.
.
.
                                    
            <interceptor-ref name="user"/>            
</action>  


I realized that one of the method should be performed only by Manager. Is
there anyway, using annotation, to prevent employee from pressing a certain
button (that leads to execution of the method)

THANK YOU!


-- 
View this message in context: http://www.nabble.com/s2%3A-howto-protect-a-method-with-annotation-tp21237786p21237786.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


      

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


Mime
View raw message