Bug #67148
closedCan only access first mount point
100%
Description
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:
#1375955684: You are not allowed to access the given folder
How-to reproduce¶
Let’s assume you have following directory structure:
fileadmin directory1 directory1.1 directory1.2
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
does that:
if ($rootId === NULL) { $rootId = $this->storage->getRootLevelFolder()->getIdentifier(); }
this method is called from FileList with rootId = NULL
. As such it defines rootId
as directory1.1
and 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:
if ($this->identifier !== $rootId) { $readablePath = $this->getParentFolder()->getReadablePath($rootId); }
in short you have access to first mount point and not any other.