if ( isKioskEnabled() ) {
throw new RuntimeException( Messages.getInstance().getString( "JcrRepositoryFileDao.ERROR_0006_ACCESS_DENIED" ) ); //$NON-NLS-1$
}
Assert.notNull( fileId );
jcrTemplate.execute( new JcrCallback() {
@Override
public Object doInJcr( final Session session ) throws RepositoryException, IOException {
RepositoryFile file = getFileById( fileId );
RepositoryFileAcl acl = aclDao.getAcl( fileId );
if ( !accessVoterManager.hasAccess( file, RepositoryFilePermission.WRITE, acl, PentahoSessionHolder