Project

General

Profile

Bug #67148

Updated by Xavier Perseguers almost 9 years ago

Since the merge of #64759, whenever a user has more than 1 mount point, he only can access the first one in File > List. Trying to access other ones crashes with: 

 <pre> 
 #1375955684: You are not allowed to access the given folder 
 </pre> 

 h2. How-to reproduce 

 Let’s assume you have following directory structure: 

 <pre> 
 fileadmin 
      directory1 
           directory1.1 
           directory1.2 
 </pre> 

 Now you define two mount points on @directory1.1@ and @directory1.2@ and assign them to a simple user. When you log in and go to file list, you can successfully open mount point for @directory1.1@ but not for @directory1.2@ since @\TYPO3\CMS\Core\Resource\Folder::getReadablePath@ @`\TYPO3\CMS\Core\Resource\Folder::getReadablePath@ does that: 

 <pre> 
         if ($rootId === NULL) { 
             $rootId = $this->storage->getRootLevelFolder()->getIdentifier(); 
         } 
 </pre> 

 this method is called from FileList with @rootId = NULL@. As such it defines @rootId@ as @directory1.1@ and then @directory1.2@ then@`directory1.2@ not being equal to @directory1.1@ it checks if you have access to parent folder (@directory1@) which is of course not the case: 

 <pre> 
		 if ($this->identifier !== $rootId) { 
			 $readablePath = $this->getParentFolder()->getReadablePath($rootId); 
		 } 
 </pre> 

 in short you have access to first mount point and not any other.

Back