posted 17 years ago
Hi,
I am using Acegi 1.0.5. I want to load and use the ACL's dynamically at runtime from the ACL tables acl_object_identity, acl_permission which are standard Acegi tables.
I am able to load the ACL's from the database using the following bean definitions.
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
<property name="url" value="jdbc:hsqldb:hsql://localhost:9001"/>
<property name="username" value="sa"/>
<property name="password" value=""/>
</bean>
<bean id="userAclService" class="org.acegisecurity.acl.basic.jdbc.JdbcDaoImpl">
<property name="dataSource">
<ref bean="dataSource"/>
</property>
</bean>
The next step is to replace/modify the following bean definition where the ACL's are clearly hard coded.
<bean id='securityInterceptor' class='org.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor'>
<property name='authenticationManager' ref='authenticationManager'/>
<property name='accessDecisionManager' ref='accessDecisionManager'/>
<property name='objectDefinitionSource'>
<value>
com.affy.BookBean.setValue=ROLE_MANAGER
com.affy.BookBean.changeValue=ROLE_WORKER,ROLE_MANAGER
</value>
</property>
</bean>
Any ideas how do I get this done?
Regards,
Vicki.
SCJP 1.4 | SCWCD 1.3 | SCBCD 1.4 | Oracle 9i:SQL | TOGAF 9