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;