Package org.pentaho.platform.plugin.services.security.userrole.ldap

Examples of org.pentaho.platform.plugin.services.security.userrole.ldap.UnionizingLdapAuthoritiesPopulator


    wrappedPop2.setGroupSearchFilter( "(uniqueMember={0})" ); //$NON-NLS-1$

    Set populators = new HashSet();
    populators.add( wrappedPop );
    populators.add( wrappedPop2 );
    UnionizingLdapAuthoritiesPopulator unionizer = new UnionizingLdapAuthoritiesPopulator();
    unionizer.setPopulators( populators );

    unionizer.afterPropertiesSet();

    // get the user record
    DirContextOperations ctx = new SpringSecurityLdapTemplate( getContextSource() ).retrieveEntry( "uid=suzy,ou=users", //$NON-NLS-1$
        null );

    GrantedAuthority[] auths = unionizer.getGrantedAuthorities( ctx, "suzy" ); //$NON-NLS-1$

    assertTrue( null != auths && auths.length > 0 );

    List authsList = Arrays.asList( auths );
    assertTrue( authsList.contains( new GrantedAuthorityImpl( "ROLE_POWER_USER" ) ) ); //$NON-NLS-1$
View Full Code Here

TOP

Related Classes of org.pentaho.platform.plugin.services.security.userrole.ldap.UnionizingLdapAuthoritiesPopulator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.