Examples of ace()


Examples of org.pentaho.platform.api.repository2.unified.RepositoryFileAcl.Builder.ace()

      userNameUtils.getPrincipleId( tenantAcme, USERNAME_TIFFANY ) );
    RepositoryFileSid suzySid = new RepositoryFileSid( userNameUtils.getPrincipleId( tenantAcme, USERNAME_SUZY ) );
    // tiffany owns it but suzy is creating it
    Builder aclBuilder = new Builder( tiffanySid );
    // need this to be able to fetch acl as suzy
    aclBuilder.ace( suzySid, RepositoryFilePermission.READ );
    newFolder = repo.createFolder( parentFolder.getId(), newFolder, aclBuilder.build(), null );
    RepositoryFileAcl fetchedAcl = repo.getAcl( newFolder.getId() );
    assertEquals( new RepositoryFileSid( USERNAME_TIFFANY ), fetchedAcl.getOwner() );
    assertLocalAceExists( newFolder, new RepositoryFileSid( USERNAME_SUZY ),
      EnumSet.of( RepositoryFilePermission.READ ) );
View Full Code Here

Examples of org.pentaho.platform.api.repository2.unified.RepositoryFileAcl.Builder.ace()

    login( USERNAME_TIFFANY, tenantAcme, new String[] { tenantAuthenticatedRoleName } );
    RepositoryFileAcl newAcl = repo.getAcl( newFolder.getId() );

    Builder anotherNewAclBuilder = new Builder( newAcl );
    anotherNewAclBuilder.ace( new RepositoryFileSid( userNameUtils.getPrincipleId( tenantAcme,
        tenantAuthenticatedRoleName ), Type.ROLE ), RepositoryFilePermission.READ,
        RepositoryFilePermission.WRITE, RepositoryFilePermission.DELETE );

    try {
      repo.updateAcl( anotherNewAclBuilder.build() );
View Full Code Here

Examples of org.pentaho.platform.api.repository2.unified.RepositoryFileAcl.Builder.ace()

        // Give all to Tenant Admin of all ancestors
        while ( !parentTenantFolder.equals( "/" ) ) {
          ITenant tenant = new Tenant( parentTenantFolder, true );
          String parentTenantAdminRoleId = tenantedRoleNameResolver.getPrincipleId( tenant, tenantAdminRoleName );
          RepositoryFileSid parentTenantAdminSid = new RepositoryFileSid( parentTenantAdminRoleId, Type.ROLE );
          aclBuilder.ace( parentTenantAdminSid, EnumSet.of( RepositoryFilePermission.ALL ) );
          parentTenantFolder = FilenameUtils.getFullPathNoEndSeparator( parentTenantFolder );
        }
        repositoryFileAclDao.updateAcl( aclBuilder.build() );
      } catch ( Throwable th ) {
        th.printStackTrace();
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.