Commit b742b6e6 authored by Matija Obreza's avatar Matija Obreza

AclAssignerAspect and AuditLogger from app-blocks

parent 0ee3ab13
......@@ -16,14 +16,30 @@
package org.genesys2.spring.config;
import org.genesys.blocks.security.component.AclAssignerAspect;
import org.genesys.blocks.security.component.Slf4jLogAuditLogger;
import org.genesys.blocks.security.lockout.AccountLockoutConfig;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.ImportResource;
import org.springframework.security.acls.domain.AuditLogger;
@Configuration
@ImportResource("classpath:/spring/spring-security.xml")
@Import({ AccountLockoutConfig.class })
public class SpringSecurityConfig {
/**
* Ensure that AclAware models have permissions assigned and removed
*/
@Bean
public AclAssignerAspect aclAssignerAspect() {
return new AclAssignerAspect();
}
@Bean
public AuditLogger auditLogger() {
return new Slf4jLogAuditLogger();
}
}
package org.genesys2.tests;
import org.genesys.blocks.security.component.AclAssignerAspect;
import org.genesys2.server.test.JpaDataConfig;
import org.genesys2.server.test.PropertyPlacholderInitializer;
import org.genesys2.spring.config.ElasticsearchConfig;
import org.genesys2.spring.config.HazelcastConfig;
import org.genesys2.spring.config.SpringCacheConfig;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.ContextConfiguration;
......@@ -16,5 +18,8 @@ import org.springframework.test.context.TestPropertySource;
@ContextConfiguration(name = "root", classes = { JpaDataConfig.class, HazelcastConfig.class, ElasticsearchConfig.class, SpringCacheConfig.class }, initializers = PropertyPlacholderInitializer.class)
public abstract class BaseSpringTest {
@Bean
public AclAssignerAspect aclAssignerAspect() {
return new AclAssignerAspect();
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment