Commit 7fc39103 authored by Matija Obreza's avatar Matija Obreza

Configure JsonSidConverter for Audited model serialization

parent 6cbf4a6a
......@@ -24,7 +24,9 @@ import org.genesys.blocks.security.service.CustomAclService;
import org.genesys.blocks.security.service.PasswordPolicy;
import org.genesys.blocks.security.service.impl.CustomAclServiceImpl;
import org.genesys.blocks.security.service.impl.SimplePasswordPolicy;
import org.genesys.blocks.util.JsonSidConverter;
import org.genesys2.server.cache.HazelcastAclCache;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.CacheManager;
import org.springframework.context.annotation.Bean;
......@@ -45,13 +47,19 @@ import org.springframework.security.crypto.password.PasswordEncoder;
@Configuration
//@EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true)
@Import({ AccountLockoutConfig.class })
public class SecurityConfig {
public class SecurityConfig implements InitializingBean {
@Autowired
private DataSource dataSource;
@Autowired
private CacheManager cacheManager;
@Override
public void afterPropertiesSet() throws Exception {
// Configure JsonSidConverter
JsonSidConverter.setSidProvider(customAclService());
}
/**
* Session registry.
......@@ -108,6 +116,7 @@ public class SecurityConfig {
@Bean
public CustomAclService customAclService() {
System.err.println("Making ACL service!!");
return new CustomAclServiceImpl();
}
......
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