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