Package org.pentaho.platform.security.userroledao

Examples of org.pentaho.platform.security.userroledao.DefaultTenantedPrincipleNameResolver


    mp.defineInstance( IAuthorizationPolicy.class, authorizationPolicy );
    mp.defineInstance( ITenantManager.class, tenantManager );
    mp.defineInstance( "roleAuthorizationPolicyRoleBindingDaoTarget", roleBindingDaoTarget );
    mp.defineInstance( "repositoryAdminUsername", repositoryAdminUsername );
    mp.defineInstance("RepositoryFileProxyFactory", new RepositoryFileProxyFactory(this.jcrTemplate, this.repositoryFileDao));
    mp.defineInstance("ITenantedPrincipleNameResolver", new DefaultTenantedPrincipleNameResolver());
    // Start the micro-platform
    mp.start();
    loginAsRepositoryAdmin();
    setAclManagement();
View Full Code Here


    entityMetaData.setTitle( repositoryFile.getTitle() );
    setPath( adjustedPath );
  }

  private void createEntityAcl( RepositoryFileAcl repositoryFileAcl ) {
    DefaultTenantedPrincipleNameResolver nameResolver = new DefaultTenantedPrincipleNameResolver();

    if ( repositoryFileAcl == null ) {
      return;
    }
    entityAcl = new EntityAcl();
    entityAcl.setEntriesInheriting( repositoryFileAcl.isEntriesInheriting() );
    entityAcl.setOwner( nameResolver.getPrincipleName( repositoryFileAcl.getOwner().getName() ) );
    entityAcl.setOwnerType( repositoryFileAcl.getOwner().getType().name() );
    List<EntityAcl.Aces> aces = entityAcl.getAces();
    aces.clear();

    for ( RepositoryFileAce repositoryFileAce : repositoryFileAcl.getAces() ) {
      EntityAcl.Aces ace = new EntityAcl.Aces();
      ace.setRecipient( nameResolver.getPrincipleName( repositoryFileAce.getSid().getName() ) );
      ace.setRecipientType( repositoryFileAce.getSid().getType().name() );
      List<String> permissions = ace.getPermissions();
      for ( RepositoryFilePermission permission : repositoryFileAce.getPermissions() ) {
        permissions.add( permission.toString() );
      }
View Full Code Here

    mp.defineInstance( ITenantManager.class, tenantManager );
    mp.defineInstance( "roleAuthorizationPolicyRoleBindingDaoTarget", roleBindingDaoTarget );
    mp.defineInstance( "repositoryAdminUsername", repositoryAdminUsername );
    mp.defineInstance( "RepositoryFileProxyFactory", new RepositoryFileProxyFactory( this.jcrTemplate,
      this.repositoryFileDao ) );
    mp.defineInstance( "ITenantedPrincipleNameResolver", new DefaultTenantedPrincipleNameResolver() );
    mp.defineInstance("useMultiByteEncoding", new Boolean( false ) );
    mp.defineInstance( IUnifiedRepository.class, repo );
    // Start the micro-platform
    mp.start();
    loginAsRepositoryAdmin();
View Full Code Here

TOP

Related Classes of org.pentaho.platform.security.userroledao.DefaultTenantedPrincipleNameResolver

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.