Package org.pentaho.platform.engine.security

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


      }

      if ( aclUser != null ) {
        pentahoAclEntries.put( new SimpleUser( aclUser ), new SimplePermissionMask( aclValue ) );
      } else {
        pentahoAclEntries.put( new SimpleRole( aclRole ), new SimplePermissionMask( aclValue ) );
      }
    }

    return pentahoAclEntries;
  }
View Full Code Here


      @Override
      public Void call() throws Exception {
        RepositoryFile testFile = new RepositoryFile( "Test Folder", null, null ); //$NON-NLS-1$
        Map<IPermissionRecipient, IPermissionMask> perms = new LinkedHashMap<IPermissionRecipient, IPermissionMask>();
        perms.put( new SimpleUser( "suzy" ), new SimplePermissionMask( IPentahoAclEntry.PERM_EXECUTE ) );
        perms.put( new SimpleRole( "ROLE_POWER_USER" ), new SimplePermissionMask( IPentahoAclEntry.PERM_SUBSCRIBE ) );
        SpringSecurityPermissionMgr.instance().setPermissions( perms, testFile );
        PentahoBasicAclVoter voter = new PentahoBasicAclVoter();
        assertTrue( voter.hasAccess( PentahoSessionHolder.getSession(), testFile, IPentahoAclEntry.PERM_EXECUTE ) );
        assertTrue( voter.hasAccess( PentahoSessionHolder.getSession(), testFile, IPentahoAclEntry.PERM_SUBSCRIBE ) );
        assertTrue( voter.hasAccess( PentahoSessionHolder.getSession(), testFile,
View Full Code Here

      @Override
      public Void call() throws Exception {
        RepositoryFile testFile = new RepositoryFile( "Test Folder", null, null ); //$NON-NLS-1$
        Map<IPermissionRecipient, IPermissionMask> perms = new LinkedHashMap<IPermissionRecipient, IPermissionMask>();
        perms.put( new SimpleUser( "suzy" ), new SimplePermissionMask( IPentahoAclEntry.PERM_NOTHING ) );
        perms.put( new SimpleRole( "ROLE_POWER_USER" ), new SimplePermissionMask(
          IPentahoAclEntry.PERM_FULL_CONTROL ) );
        SpringSecurityPermissionMgr.instance().getPermissions( testFile );

        // Now, the stage is set. We should be able to double-check that suzy
        // has no access to the testFile.
View Full Code Here

      new LinkedHashMap<IPermissionRecipient, IPermissionMask>();

  public void setup() {
    super.setUp();
    defaultAcls.put(
        new SimpleRole( "ROLE_ADMINISTRATOR" ), new SimplePermissionMask( IPentahoAclEntry.PERM_FULL_CONTROL ) ); //$NON-NLS-1$
    defaultAcls
        .put( new SimpleRole( "ROLE_POWER_USER" ), new SimplePermissionMask( IPentahoAclEntry.PERM_FULL_CONTROL ) ); //$NON-NLS-1$
    defaultAcls.put( new SimpleRole( "ROLE_AUTHENTICATED" ), new SimplePermissionMask( IPentahoAclEntry.PERM_EXECUTE ) ); //$NON-NLS-1$
  }
View Full Code Here

TOP

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

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.