• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Dynamic ACL's in Acegi.

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Vicki Amin
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am now able to read the ACL's stored in the default ACL tables using the following bean definiations...



The next step is to somehow use the aclManager bean in the following bean...



Any help here is appreciated!!

- Vicki.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic