Search in sources :

Example 1 with InMemoryUserRoleListService

use of org.pentaho.platform.plugin.services.security.userrole.memory.InMemoryUserRoleListService in project pentaho-platform by pentaho.

the class InMemoryUserRoleListServiceTest method setUp.

@Before
public void setUp() throws Exception {
    dao = new InMemoryUserRoleListService();
    dao.setUserRoleListEnhancedUserMap(makeUserRoleListEnhancedUserMap());
    dao.setAllRoles(makeAllAuthorities());
    Properties prop = new Properties();
    prop.load(new ByteArrayInputStream("scott=wombat,ROLE_THREE,ROLE_ONE,enabled\r\nmarissa=koala,ROLE_ONE,ROLE_TWO,enabled".getBytes()));
    InMemoryUserDetailsManager wrapped = new InMemoryUserDetailsManager(prop);
    // wrapped.setUserMap( makeUserMap() );
    // wrapped.afterPropertiesSet();
    dao.setUserDetailsService(wrapped);
    dao.afterPropertiesSet();
}
Also used : InMemoryUserRoleListService(org.pentaho.platform.plugin.services.security.userrole.memory.InMemoryUserRoleListService) ByteArrayInputStream(java.io.ByteArrayInputStream) InMemoryUserDetailsManager(org.springframework.security.provisioning.InMemoryUserDetailsManager) Properties(java.util.Properties) Before(org.junit.Before)

Aggregations

ByteArrayInputStream (java.io.ByteArrayInputStream)1 Properties (java.util.Properties)1 Before (org.junit.Before)1 InMemoryUserRoleListService (org.pentaho.platform.plugin.services.security.userrole.memory.InMemoryUserRoleListService)1 InMemoryUserDetailsManager (org.springframework.security.provisioning.InMemoryUserDetailsManager)1