fe1cb4a091a4d37f3f681242f1cdc52d9c7d1e14
[utils] / security / src / test / resources / spring / test.org.wamblee.security.authorization.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
3
4 <beans>
5     
6     <bean id="org.wamblee.usermgt.UserAccessor"
7         class="org.wamblee.security.authorization.TestUserAccessor">
8         
9     </bean>
10     
11     <bean id="org.wamblee.security.authorization.OperationRegistry"
12         class="org.wamblee.security.authorization.DefaultOperationRegistry">
13         <constructor-arg>
14             <list>
15                 <bean class="org.wamblee.security.authorization.AllOperation"/>
16                 <bean class="org.wamblee.security.authorization.CreateOperation"/>
17                 <bean class="org.wamblee.security.authorization.DeleteOperation"/>
18                 <bean class="org.wamblee.security.authorization.ReadOperation"/>
19                 <bean class="org.wamblee.security.authorization.WriteOperation"/>                
20             </list>
21         </constructor-arg>
22     </bean>
23     
24     <bean id="org.wamblee.security.authorization.AuthorizationService"
25         class="org.wamblee.security.authorization.hibernate.PersistentAuthorizationService">
26         <constructor-arg><value>DEFAULT</value></constructor-arg>
27         <constructor-arg><ref bean="org.springframework.orm.hibernate3.HibernateTemplate"/></constructor-arg>
28         <constructor-arg><ref bean="org.wamblee.usermgt.UserAccessor"/></constructor-arg>
29         <constructor-arg><value type="long">10000</value></constructor-arg>
30     </bean>
31     
32     <!-- any user -->
33     <bean id="anyUserCondition" class="org.wamblee.security.authorization.AnyUserCondition">
34     </bean>
35     
36     <!-- administrators -->
37     <bean id="adminUserCondition" class="org.wamblee.security.authorization.GroupUserCondition">
38         <constructor-arg><value>administrators</value></constructor-arg>
39     </bean>
40    
41 </beans>