Package org.pentaho.platform.engine.security

Examples of org.pentaho.platform.engine.security.DefaultUsernameComparator


    userRoleListService = new UserRoleListService();
    userRoleListService.setExtraRoles( extraRoles );
    userRoleListService.setSystemRoles( systemRoles );
    userRoleListService.setRoleComparator( new DefaultRoleComparator() );
    userRoleListService.setUserComparator( new DefaultUsernameComparator() );
  }
View Full Code Here


    allUsernamesSearch.afterPropertiesSet();

    DefaultLdapUserRoleListService userRoleListService = new DefaultLdapUserRoleListService();

    userRoleListService.setAllUsernamesSearch( allUsernamesSearch );
    userRoleListService.setUsernameComparator( new DefaultUsernameComparator() );

    List res = userRoleListService.getAllUsers();

    assertTrue( res.indexOf( "pat" ) < res.indexOf( "tiffany" ) );
View Full Code Here

        new GenericLdapSearch( getContextSource(), paramFactory, transformer1, transformer2 );

    DefaultLdapUserRoleListService userRoleListService = new DefaultLdapUserRoleListService();

    userRoleListService.setUsernamesInRoleSearch( usernamesInRoleSearch );
    userRoleListService.setUsernameComparator( new DefaultUsernameComparator() );

    List<String> res = userRoleListService.getUsersInRole( null, "DEV" ); //$NON-NLS-1$

    assertTrue( res.contains( "pat" ) ); //$NON-NLS-1$
    assertTrue( res.contains( "tiffany" ) ); //$NON-NLS-1$
View Full Code Here

    }
  }

  @Test
  public void testGetAllUserNamesSorted() throws Exception {
    dao.setUsernameComparator( new DefaultUsernameComparator() );
    List<String> usernames = dao.getAllUsers();
    if ( logger.isDebugEnabled() ) {
      logger.debug( "testGetAllUserNamesSorted(): Usernames: " + usernames ); //$NON-NLS-1$
    }
    assertTrue( usernames.indexOf( "marissa" ) < usernames.indexOf( "scott" ) );
View Full Code Here

    }
  }

  @Test
  public void testGetAllUserNamesInRoleSorted() throws Exception {
    dao.setUsernameComparator( new DefaultUsernameComparator() );
    List<String> usernames = dao.getUsersInRole( null, "ROLE_ONE" );
    if ( logger.isDebugEnabled() ) {
      logger.debug( "testGetAllUserNamesInRoleSorted(): Usernames: " + usernames ); //$NON-NLS-1$
    }
    assertTrue( usernames.indexOf( "marissa" ) < usernames.indexOf( "scott" ) );
View Full Code Here

TOP

Related Classes of org.pentaho.platform.engine.security.DefaultUsernameComparator

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.