1
0
mirror of synced 2026-08-03 16:56:56 +00:00

SEC-999: Refactored namespace to take an expression handler instead of a permission evaluator, allowig fo greater cusomtomization and for a single handler to be used in both web and method security expressions.

This commit is contained in:
Luke Taylor
2008-11-13 07:41:21 +00:00
parent ee13be47b7
commit 464da0f0df
9 changed files with 123 additions and 61 deletions
@@ -15,7 +15,7 @@
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.5.xsd">
<global-method-security expression-annotations="enabled">
<permission-evaluator ref="permissionEvaluator"/>
<expression-handler ref="expressionHandler"/>
</global-method-security>
<http auto-config="true" realm="Contacts Realm">
@@ -47,8 +47,12 @@
<b:property name="targetUrl" value="/secure/index.htm"/>
</b:bean>
<b:bean id="expressionhandler" class="org.springframework.security.expression.support.DefaultSecurityExpressionHandler">
<b:property name="permissionEvaluator" ref="permissionEvaluator" />
</b:bean>
<b:bean id="permissionEvaluator" class="org.springframework.security.acls.AclPermissionEvaluator">
<b:constructor-arg ref="aclService" />
<b:constructor-arg ref="aclService"/>
</b:bean>
</b:beans>
@@ -14,7 +14,7 @@
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.5.xsd">
<global-method-security expression-annotations="enabled">
<permission-evaluator ref="permissionEvaluator"/>
<expression-handler ref="expressionhandler"/>
</global-method-security>
<!-- ======================== AUTHENTICATION ======================= -->
@@ -24,8 +24,12 @@
<jdbc-user-service data-source-ref="dataSource"/>
</authentication-provider>
<b:bean id="expressionhandler" class="org.springframework.security.expression.support.DefaultSecurityExpressionHandler">
<b:property name="permissionEvaluator" ref="permissionEvaluator" />
</b:bean>
<b:bean id="permissionEvaluator" class="org.springframework.security.acls.AclPermissionEvaluator">
<b:constructor-arg ref="aclService" />
<b:constructor-arg ref="aclService"/>
</b:bean>
</b:beans>