Examples of PentahoAllowAllAclVoter


Examples of org.pentaho.platform.engine.security.acls.voter.PentahoAllowAllAclVoter

      @Override
      public Void call() throws Exception {
        RepositoryFile testFile = new RepositoryFile( "Test Folder", null, null ); //$NON-NLS-1$
        // RepositoryFile has no acls on it. Nobody should be able to access it.
        // But, we're using an allowAll voter.
        PentahoAllowAllAclVoter voter = new PentahoAllowAllAclVoter();
        assertTrue( voter.hasAccess( PentahoSessionHolder.getSession(), testFile, IPentahoAclEntry.PERM_EXECUTE ) );
        IPentahoAclEntry entry = voter.getEffectiveAcl( PentahoSessionHolder.getSession(), testFile );
        assertEquals( ( (PentahoAclEntry) entry ).getMask(), IPentahoAclEntry.PERM_FULL_CONTROL );
        assertTrue( voter.isPentahoAdministrator( PentahoSessionHolder.getSession() ) );
        assertTrue( voter.isGranted( PentahoSessionHolder.getSession(), new GrantedAuthorityImpl( "ROLE_ANYTHING" ) ) ); //$NON-NLS-1$

        return null;
      }

    } );
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.