Package org.pentaho.platform.api.repository2.unified

Examples of org.pentaho.platform.api.repository2.unified.RepositoryFileAcl


    // Get repository file info and acl info of parent
    if ( parentFolderId != null ) {
      RepositoryFile parentRepositoryFile = getFileById( parentFolderId );
      if ( parentRepositoryFile != null ) {
        RepositoryFileAcl parentAcl = aclDao.getAcl( parentRepositoryFile.getId() );
        // Invoke accessVoterManager to see if we have access to perform this operation
        if ( !accessVoterManager.hasAccess( parentRepositoryFile, RepositoryFilePermission.WRITE, parentAcl,
            PentahoSessionHolder.getSession() ) ) {
          return null;
        }
View Full Code Here


    // Get repository file info and acl info of parent
    if ( parentFolderId != null ) {
      RepositoryFile parentRepositoryFile = getFileById( parentFolderId );
      if ( parentRepositoryFile != null ) {
        RepositoryFileAcl parentAcl = aclDao.getAcl( parentRepositoryFile.getId() );
        // Invoke accessVoterManager to see if we have access to perform this operation
        if ( !accessVoterManager.hasAccess( parentRepositoryFile, RepositoryFilePermission.WRITE, parentAcl,
            PentahoSessionHolder.getSession() ) ) {
          return null;
        }
View Full Code Here

    Assert.notNull( file );
    Assert.isTrue( !file.isFolder() );
    Assert.notNull( content );
    // Get repository file info and acl info of parent
    RepositoryFileAcl acl = aclDao.getAcl( file.getId() );
    // Invoke accessVoterManager to see if we have access to perform this operation
    if ( !accessVoterManager.hasAccess( file, RepositoryFilePermission.WRITE, acl, PentahoSessionHolder.getSession() ) ) {
      return null;
    }
    lockHelper.addLockTokenToSessionIfNecessary( session, pentahoJcrConstants, file.getId() );
View Full Code Here

        Node fileNode = session.getNodeByIdentifier( fileId.toString() );
        RepositoryFile file =
            fileNode != null ? JcrRepositoryFileUtils.nodeToFile( session, pentahoJcrConstants, pathConversionHelper,
                lockHelper, fileNode, loadMaps, locale ) : null;
        if ( file != null ) {
          RepositoryFileAcl acl = aclDao.getAcl( file.getId() );
          // Invoke accessVoterManager to see if we have access to perform this operation
          if ( !accessVoterManager.hasAccess( file, RepositoryFilePermission.READ, acl, PentahoSessionHolder
              .getSession() ) ) {
            return null;
          }
View Full Code Here

    }
    RepositoryFile file =
        fileNode != null ? JcrRepositoryFileUtils.nodeToFile( session, pentahoJcrConstants, pathConversionHelper,
            lockHelper, (Node) fileNode, loadMaps, locale ) : null;
    if ( file != null ) {
      RepositoryFileAcl acl = aclDao.getAcl( file.getId() );
      // Invoke accessVoterManager to see if we have access to perform this operation
      if ( !accessVoterManager.hasAccess( file, RepositoryFilePermission.READ, acl, PentahoSessionHolder.getSession() ) ) {
        return null;
      }
    }
View Full Code Here

                JcrRepositoryFileUtils.getFileContentType( session, pentahoJcrConstants, fileId, versionId ),
                contentClass ) );
        if ( fileId != null ) {
          RepositoryFile file = internalGetFileById( fileId, false, null );
          if ( file != null ) {
            RepositoryFileAcl acl = aclDao.getAcl( fileId );
            // Invoke accessVoterManager to see if we have access to perform this operation
            if ( !accessVoterManager.hasAccess( file, RepositoryFilePermission.READ, acl, PentahoSessionHolder
                .getSession() ) ) {
              return null;
            }
View Full Code Here

      @Override
      public Object doInJcr( final Session session ) throws RepositoryException, IOException {
        RepositoryFile fileToBeDeleted = getFileById( fileId );
        // Get repository file info and acl info of parent
        if ( fileToBeDeleted != null ) {
          RepositoryFileAcl toBeDeletedFileAcl = aclDao.getAcl( fileToBeDeleted.getId() );
          // Invoke accessVoterManager to see if we have access to perform this operation
          if ( !accessVoterManager.hasAccess( fileToBeDeleted, RepositoryFilePermission.DELETE, toBeDeletedFileAcl,
              PentahoSessionHolder.getSession() ) ) {
            return null;
          }
View Full Code Here

      @Override
      public Object doInJcr( final Session session ) throws RepositoryException, IOException {
        RepositoryFile fileToBeDeleted = getFileById( fileId );
        // Get repository file info and acl info of parent
        if ( fileToBeDeleted != null ) {
          RepositoryFileAcl toBeDeletedFileAcl = aclDao.getAcl( fileToBeDeleted.getId() );
          // Invoke accessVoterManager to see if we have access to perform this operation
          if ( !accessVoterManager.hasAccess( fileToBeDeleted, RepositoryFilePermission.DELETE, toBeDeletedFileAcl,
              PentahoSessionHolder.getSession() ) ) {
            return null;
          }
View Full Code Here

      @Override
      public Object doInJcr( final Session session ) throws RepositoryException, IOException {
        RepositoryFile fileToBeDeleted = getFileById( fileId );
        // Get repository file info and acl info of parent
        if ( fileToBeDeleted != null ) {
          RepositoryFileAcl toBeDeletedFileAcl = aclDao.getAcl( fileToBeDeleted.getId() );
          // Invoke accessVoterManager to see if we have access to perform this operation
          if ( !accessVoterManager.hasAccess( fileToBeDeleted, RepositoryFilePermission.DELETE, toBeDeletedFileAcl,
              PentahoSessionHolder.getSession() ) ) {
            return null;
          }
View Full Code Here

        PentahoJcrConstants pentahoJcrConstants = new PentahoJcrConstants( session );
        String absOrigParentFolderPath =
            deleteHelper.getOriginalParentFolderPath( session, pentahoJcrConstants, fileId );
        Serializable origParentFolderId = null;
        RepositoryFile file = getFileById( fileId );
        RepositoryFileAcl acl = aclDao.getAcl( fileId );
        if ( !accessVoterManager.hasAccess( file, RepositoryFilePermission.WRITE, acl, PentahoSessionHolder
            .getSession() ) ) {
          return null;
        }
        // original parent folder path may no longer exist!
View Full Code Here

TOP

Related Classes of org.pentaho.platform.api.repository2.unified.RepositoryFileAcl

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.