Search in sources :

Example 1 with DefaultLdapRoleMapper

use of org.pentaho.platform.engine.security.DefaultLdapRoleMapper in project pentaho-platform by pentaho.

the class DefaultLdapUserRoleListServiceTest method getDefaultLdapUserRoleListService.

private DefaultLdapUserRoleListService getDefaultLdapUserRoleListService(Map<String, String> roleMap) {
    IAuthenticationRoleMapper roleMapper = new DefaultLdapRoleMapper(roleMap);
    DefaultLdapUserRoleListService defaultLdapUserRoleListService = new DefaultLdapUserRoleListService(null, null, roleMapper);
    defaultLdapUserRoleListService.setExtraRoles(Arrays.asList(ROLES));
    defaultLdapUserRoleListService.setUserNameUtils(new DefaultTenantedPrincipleNameResolver());
    defaultLdapUserRoleListService.setRoleNameUtils(new DefaultTenantedPrincipleNameResolver("_"));
    return defaultLdapUserRoleListService;
}
Also used : DefaultLdapUserRoleListService(org.pentaho.platform.plugin.services.security.userrole.ldap.DefaultLdapUserRoleListService) DefaultLdapRoleMapper(org.pentaho.platform.engine.security.DefaultLdapRoleMapper) DefaultTenantedPrincipleNameResolver(org.pentaho.platform.security.userroledao.DefaultTenantedPrincipleNameResolver) IAuthenticationRoleMapper(org.pentaho.platform.api.engine.security.IAuthenticationRoleMapper)

Aggregations

IAuthenticationRoleMapper (org.pentaho.platform.api.engine.security.IAuthenticationRoleMapper)1 DefaultLdapRoleMapper (org.pentaho.platform.engine.security.DefaultLdapRoleMapper)1 DefaultLdapUserRoleListService (org.pentaho.platform.plugin.services.security.userrole.ldap.DefaultLdapUserRoleListService)1 DefaultTenantedPrincipleNameResolver (org.pentaho.platform.security.userroledao.DefaultTenantedPrincipleNameResolver)1