Bonjour, je voudrais sécuriser les méthodes de mes actions. Pour cela je voulais utiliser l'intercepteur aopalliance.MethodSecurityInterceptor
Mais Apparemment cela ne fonctionne pas.

Mes action hérite de la DispatchActionSupport.

ApplicationContext.xml
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
 
<beans>
	<bean name="/monaction" class="classeAction" />
	<bean id="intercepteur" class="org.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor">
		<property name="authenticationManager" ref="myAuthenticationManager"/>
		<property name="accessDecisionManager" ref="httpRequestAccessDecisionManager"/>
		<property name="objectDefinitionSource">
			<value>
				classeAction.create=ROLE_1
				classeAction.modify=ROLE_2
			</value>
		</property>
	</bean>
	<bean id="autoProxyCreator" class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
		<property name="interceptorNames">
			<list>
				<value>intercepteur</value>
			</list>
		</property>
		<property name="beanNames">
			<list>
				<value>/monaction</value>
			</list>
		</property>
	</bean>
<beans>
Strut-config.xml
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
 
<action path="/monaction"
	type="org.springframework.web.struts.DelegatingActionProxy"
	parameter="method"
	name="monForm"
	input="page/mapage">
	<forward name="success" 	path="page/mapage" />
	<forward name="retourListe"	path="/monActionListe.do" />
</action>
<plug-in className="org.springframework.web.struts.ContextLoaderPlugIn">
	<set-property property="contextConfigLocation" value="/WEB-INF/
ApplicationContext.xml" />
</plug-in>