Examples of mapConnectionRoles()


Examples of org.pentaho.platform.plugin.action.mondrian.mapper.MondrianOneToOneUserRoleListMapper.mapConnectionRoles()

    mapper.setFailOnEmptyRoleList( true );
    try {
      SecurityHelper.getInstance().runAsUser( "admin", new Callable<String[]>() {
        @Override
        public String[] call() throws Exception {
          return mapper.mapConnectionRoles( PentahoSessionHolder.getSession(), "SteelWheelsRoles" );
        }
      } );
      Assert.fail();
    } catch ( PentahoAccessControlException e ) {
      // No op.
View Full Code Here

Examples of org.pentaho.platform.plugin.action.mondrian.mapper.MondrianOneToOneUserRoleListMapper.mapConnectionRoles()

    mapper.setFailOnEmptyRoleList( false );
    try {
      String[] roles = SecurityHelper.getInstance().runAsUser( "simplebob", new Callable<String[]>() {
        @Override
        public String[] call() throws Exception {
          return mapper.mapConnectionRoles( PentahoSessionHolder.getSession(), "SteelWheelsRoles" );
        }
      } );
      Assert.assertArrayEquals( new String[] { "Role1", "Role2" }, roles );
    } catch ( PentahoAccessControlException e ) {
      Assert.fail( e.getMessage() );
View Full Code Here

Examples of org.pentaho.platform.plugin.action.mondrian.mapper.MondrianUserSessionUserRoleListMapper.mapConnectionRoles()

      String[] roles = SecurityHelper.getInstance().runAsUser( "admin", new Callable<String[]>() {
        @Override
        public String[] call() throws Exception {
          IPentahoSession session = PentahoSessionHolder.getSession();
          session.setAttribute( "rolesAttribute", new Object[] { "mondrianRole1", "mondrianRole2", "mondrianRole3" } );
          return mapper.mapConnectionRoles( session, "SteelWheelsRoles" );
        }
      } );

      Assert.assertNotNull( roles );
      Assert.assertEquals( 3, roles.length );
View Full Code Here

Examples of org.pentaho.platform.plugin.action.mondrian.mapper.MondrianUserSessionUserRoleListMapper.mapConnectionRoles()

    try {
      String[] roles = SecurityHelper.getInstance().runAsUser( "admin", new Callable<String[]>() {
        @Override
        public String[] call() throws Exception {
          return mapper.mapConnectionRoles( PentahoSessionHolder.getSession(), "SteelWheelsRoles" );
        }
      } );

      Assert.assertNull( roles );
    } catch ( PentahoAccessControlException e ) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.